CS320A adc precision

CS320A adc precision, a forum discussion on Cleverscope Mixed Signal USB Oscilloscopes. Join us for more discussions on CS320A adc precision on our Questions forum.

Back to Forum Index : Back to Questions   RSS
Andrew Bourhill

23 Nov 2012
Posts: 5

Hi

I am trying to change the bit resolution.

I form my usb command packet as

0x40 //set
0x35 // cmd_adc_precision
0x02 // 14bit
0x00
0x00
0x00
0x?? (negated additive checksum)

the scope doesnt reply. if I do a get adc precision it tells me 10bit ??

how do I adjust this to 14bit.

many thanks for all your help
bartschroder

23 Nov 2012
Posts: 479

Hello Andrew,
For others - the format of a command is
Byte 1: Channel
Bit 7:6 1=Set, 0= Get, 2 = Reply
Bit 5 0 = short format, 1 = long format
Bit 4 0 = address bit. Not currently used.
Bits 3:0 Channels 0..15
At present only channels 0..4 are used:
0 = Chan A,
1 = Chan B
2 = Ext Trig
3 = Dig Trig
4 = Rear input
Byte 2: Command
Bytes 3-6: Parameter
32 bit. Low byte first, high byte last
Byte 7: Checksum.
8 bit. Negated sum of all preceding bytes in the packet.

So the command is
0x40 set - as you say
0x35 //cmd_adc_precsion - correct
0x02 //parameter lsb = 02, 14 bit - correct
0x00
0x00
0x00 //parameter msb
0x89 //negated 0x 40 + 35 + 2 + 0 + 0 + 0 +0 = 0x77. Negate 0x77 and get 0xFFFF89.
//send 8 bit value only = 89.

If the checksum is incorrect the command is ignored. Make sure you have the correct checksum!

I hope this helps.
Andrew Bourhill

23 Nov 2012
Posts: 5

Hi Thanks for the reply,

I have checked my outgoing packet for the correct checksum and indeed it is as correctly calculated as 0x89.

The device does not respond with a reply so I then use a GET command to check and it replys with a packet indicating it is in 10Bit (returned parameter 0x00)

I hope you can help me resolve this, I really need to get this working in 14bits.

Many thanks in advance

bartschroder

24 Nov 2012
Posts: 479

Hello Andrew,
In our system a Set does not result in a reply. This is because the USB protocol guarantees delivery unless there is a time out.

So yes, if you want to confirm you will have to do a Get. The command would be 0 35 0 0 0 0 CB, all values hex. I just checked this here with a 14 bit unit, and got the expected response which was
80 35 2 0 0 0 49.

80 means reply.

I'm assuming your unit is 14 bit (I think all the HVPD ones are).
The label on the back should be of the form mem.sps.14.sig.io
If it is a 10 bit unit it will return a 10 bit setting regardless. (You can still set to 14 bit, if filtering is on).

I can sent you a command sender/reader if you like. Please send an email direct to support@cleverscope.com.

Let me know how you go.

Andrew Bourhill

24 Nov 2012
Posts: 5

Hi Bart

The label on the back of this unit is mem.sps.bit.sig.io
where the boxout below has 4.10.10.0.1

I am assuming this must mean it is 10Bit only ?

bartschroder

24 Nov 2012
Posts: 479

Hello Andrew,
yes, that is the reason. You have a 10 bit unit in your hands. You can't set a 10 bit unit to be 14 bit!
You must have bought a 10 bit one at some stage.

regards

Bart

bartschroder

24 Nov 2012
Posts: 479

Hello Andrew,
yes, that is the reason. You have a 10 bit unit in your hands. You can't set a 10 bit unit to be 14 bit!
You must have bought a 10 bit one at some stage.

regards

Bart

Andrew Bourhill

26 Nov 2012
Posts: 5

Hi bart

Yes thanks, I will investigate this. As far as we are aware all our units should be 14bit.

Many thanks for your help

Back to Forum Index : Back to Questions   RSS
You must be logged in to post a reply



You need to Register or Log In before posting on these forums.

×

Your shopping cart is empty.