Products > Test Equipment

SainSmart DDS120 & DDS140 USB Oscilloscope

<< < (12/84) > >>

doctormord:

--- Quote from: psynapse on October 15, 2014, 08:45:41 pm ---Doctormord:
I am still making progress on the code, but ask myself whether there is anybody wanting it.  Are there elements that you are searching for? I guess you are not planning on rewriting the DLL!

--- End quote ---

Hi psynapse,

at first i'm looking for a working/better software solution. At second, it would be nice to maybe implement the functionallity i had coded once for my Rigol DS1000 series scope. (Datalogger)



@Donut6:

Is there any way i can test/explore something on my DDS120 yet? (Codes, Commands, Responses)

Edit:

I set up Wireshark + USBCap to see some magic and i really wonder about the fact that an amplitude of "zero" -> 0V is encoded as 0x82 in the stream. So when using the scope in DC-coupled mode, the effective resolution is only 7 bit.

Both channels open, no signal:

--- Code: ---No.     Time           Source                Destination           Protocol Length Info
   6076 647.832144000  1.2                   host                  USB      65563  URB_INTERRUPT in

Frame 6076: 65563 bytes on wire (524504 bits), 65535 bytes captured (524280 bits) on interface 0
USB URB
    USBPcap pseudoheader length: 27
    IRP ID: 0xffffffff86746be8
    IRP USBD_STATUS: USBD_STATUS_SUCCESS (0x00000000)
    URB Function: URB_FUNCTION_BULK_OR_INTERRUPT_TRANSFER (0x0009)
    IRP information: 0x01, Direction: PDO -> FDO
        0000 000. = Reserved: 0x00
        .... ...1 = Direction: PDO -> FDO (0x01)
    URB bus id: 7
    Device address: 1
    Endpoint: 0x82, Direction: IN
    URB transfer type: URB_INTERRUPT (0x01)
    Packet Data Length: 65536
    [bInterfaceClass: Unknown (0xffff)]
Leftover Capture Data: 828283828382828283838282828283838382828282828282...
--- End code ---

Data is formated as CH1,CH2,CH1...
where 0x82 is "min_amplitude" and 0xFF is "max_amplitude" at DC-coupling. AC-coupling would (as expected) be 0x00-0xFF.

Data input compared to timebase (tested with Rocktech software version):


--- Code: ---Timebase Samplerate dpps Size
50ns-1us 50MHz 10 1024
4us 2.4MHz 10 2048
20us 2.4MHz 10 4096
200ns 2.4MHz 5 65536
500ns 2.4MHz 5 65536
1ms-5ms 240kHz 5 65536
10ms 240kHz 3,7* 131072
20ms 240kHz 1,85* 262144
100ms 240kHz 0,91* 524288
200ms 240kHz 0,459* 1048576
--- End code ---

*Data-request-polling is set to 200ms (5rps), response (dpps - data packets per second) from scope lags behind.

The SainSmart software version has changed polling-rate/packet-size. I.e. with 10ms timebase polling rate is now 100ms with response times 70/200ms and 32k datapacketsize (compared to 64k at the Rocktech software), so this is running totally async. (out of control)

Shown here: (SainSmart 10ms timebase):




DDS120

Control Settings
24,00 CH1 to AC
24,08 CH1 to DC

25,00 CH2 to AC
25,01 CH2 to DC


94,11 240kHz (1ms to 2s)
94,01 2.4Mhz (4us to 2ms)
94,10 50Mhz (50ns to 1us) <-- would guess, it's 48Mhz real sampling rate

33,00 request data

CH1 Voltage setting:
22,08 50mV
22,04 100mV
22,00 200mV
22,06 500mV
22,02 1V
22,02 2V
22,02 5V

CH2 Voltage setting:
23,20 50mV
23,10 100mV
23,00 200mV
23,12 500mV
23,02 1V
23,02 2V
23,02 5V

So no PGA scaling, same resolution for 1V/2V/5V which corresponds to 6/7/8Bit, or 20mV/Step in AC-mode.

No more codes avail, so no CH1/CH2 on/off, no trigger settings.

Some signal generator codes:
62,00 square wave output
60,00 sine wave output
61,00 triangle output

Some misc codes:
34,01 enable logic analyzer mode
34,00 enable scope mode

I somehow captured data in logic analyzer mode (with the SainSmart software provided). There were a bitpattern shown when switched back to scope-mode, but somehow the software got f*cked up then.  ::)

Using the old Rocktech release, Logic analyser is working, readout is done on CH2. (So hardware.addon with some weak-pulldowns might be possible to implement)

Maybe "94,10" (Rocktech) vs. "94,01" (SainSmart) at initialisation is doing some magic here. (See below)

First time running (using START button) with default settings (Rocktech Version):
31,00 SET ISOCH DELAY
24,08 CH1 to DC
25,01 CH2 to DC
94,10
22,02 CH1 1-5V
23,02 CH2 1-5V
90,01; 90,02; 90,05; 90,03; 90,06; 90,04
90,07; 90,08; 90,09; 90,0A; 90,0B; 90,0C; 90,0D; 90,0E; 90,0F; 90,10; 90,11; 90,12; 90,13
94,10
22,02 CH1 1-5V
23,02 CH2 1-5V

First time running (using START button) with default settings (SainSmart Version):
90,01; 90,02; 90,05; 90,03; 90,06; 90,04
90,07; 90,08; 90,09; 90,0A; 90,0B; 90,0C; 90,0D; 90,0E; 90,0F; 90,10; 90,11; 90,12; 90,13
94,01
22,02 CH1 1-5V
23,02 CH2 1-5V
24,08 CH1 to DC
25,01 CH2 to DC

For the DDS140 i got some more requests at:

34, 50, 63, 75, 76, 77, 78, 79, 7A, 7B, 7C, 7D, E7,  90, 94

Edit:

Due to some magic, i opened up some kind of calibration menu in the rocktech software.


--- Code: --- #define  CHAN0_ZERO 132
 #define CHAN1_ZERO 128
 #define CHAN0_ZERO500mv 132
 #define CHAN1_ZERO500mv 128
 #define CHAN0_ZERO50mv 133
 #define CHAN1_ZERO50mv 129
 #define CHAN0_ZERO100mv 132
 #define CHAN1_ZERO100mv 128
 #define CHAN0_1V 205
 #define CHAN1_1V 0
 #define CHAN0_500MV 12
 #define CHAN1_500MV 154
 #define CHAN0_200MV 159
 #define CHAN1_200MV 165
 #define CHAN0_100MV 144
 #define CHAN1_100MV 151
 #define CHAN0_50MV 132
 #define CHAN1_50MV 137
--- End code ---

 ???



To access, start BM102.exe
select "Oscilloscope + Signal Generator" from the menu
change to Signal-Generator window
press play button once (beside the number-buttons)
change back to "Osillagraph" window

Right then, all values are at 128 with no "zero adjustment", info box is empty.

Click "adjust" to set the defines.

Set both channels to "AC" and "ON"
Click "Start" button
Click "zero" button on the overlay menu
-> now the right column will filled up with values to be the ranges new "zero"
( #define  CHANx_ZEROyyMV)
Click "adjust" to set the #defines

Dunno what the scale button is doing so far, beside, it "scales" the signal on screen with the values from the left column. To get back, hit "adjust".

Everything setup in this menu is only valid for the current session. Nothing is saved in a file nor the scope.

psynapse:
Doctormord

First, many thanks for the codes from the 120, I will do a compare and contrast.

Second some pure speculation, which might give you hope. Remember I do not have a DDS120 on which to check!

DC input.  The analogue front end is certainly buffered (protection and for the attenuator etc).  Most of the front ends I have seen will have a limited gain op amp acting as circuit protection.  The only sensible design decision will be that the output of the opamp rests around half of supply volts, obviously for AC, but also I suspect for DC. This would mean that your scope would measure +ve and -ve DC voltages, and hence rest half way up the digitising scale ...7F,80,81.

Datalogging. Even more speculation depending on the actual implementation in hardware/firmware of the DDS120.  As far as I can see at the moment, long period datalogging on the DDS140 (sic) will not be possible. It uses a standard RAM chip as buffer, controlled by a small CPLD. So it is either being written to by the A/D or being read from (indirectly) the host PC.  It cannot be doing both at the same instant. At low recording speeds, sure the CPLD could interleave reads and writes, but at 100Mhz no, and what hopes do you or I have about how clever the designers have been  :(  So I would keep the faith with the DDS120. As far as I can see, at lower speeds (perhaps even 10Msps), the firmware may be clever enough to interleave FIFO reads and writes.  But that is unexplored at this time.  As a DDS140 owner, I have ordered a 10€ EZ-USB breakout board of the sort used for logic analysers.  My hope is to build an AD front end for that (sometime in the future)  ......EDIT, but having just looked at your wireshark traces, I agree the DDS120 seems a catastrophy, getting data when the host software feels like it.

Software.  Me and you both!  In fact everybody in this forum wants exactly that.  Donut6 seems to be storming forward on that front. And who knows, with an open interface, other groups might take up the challenge too, and we will be spoilt for software choice.  Me, I shall keep the faith with Donut6, I know the amount of work he is putting in.  So your contributions on command codes for the DDS120 make a real difference.

doctormord:
Having the codes, the DDS120 might gets integrated (supported) into "OpenHantek":

http://www.openhantek.org/

Or "Open6022BE" from RichardK:

https://www.eevblog.com/forum/testgear/hantek-6022be-20mhz-usb-dso/630/

ftp://ftp.pididu.com/OpenHantek/



doctormord:
Well,  the polling might get better with a triggered signal. Haven't tried, was set up to freerunning all the time (No trigger).

This really needs to be adjusted.

psynapse:
Doctormord,

Yes I agree, looking at your trace, you seem to have lost a data packet (which is quite acceptable under USB rules I believe)

I have looked at some of your codes on the DDS140, as well as photos of the DDS120.

DDS120:- I note that Port C is largely wired to the analogue front end. PC.0 to the AD encode pin, PC.1 not traced by me, PC.2 and PC.3 to one of the 4 to 1 multiplexors used as attenuators, PC.4 and PC.5 to the other attenuator.  This largely agrees with your findings, but there are a couple of anomolies.  For the DDS140 it is a mess.  Command 22 is sweet, it sets 2 bits on port B similar to the DDS120, but Command 23 tweaks just one bit in port E, and port B is connected to the CPLD .....  So the long and short of that is that I think those command codes correspond, broadly, but parameters will be different.

Commands 24 and 25 (with values 0 or 1) flip single bits in E (E.2 and E.6) according to the parameter.  E.6 at least goes to the analogue front end, so good reason to expect the same function there, but again different input parameters.

Command 34 seems to be a stop/go command.  34(1) executes the same code as 33.  34(0) inverts the two bits tweaked by 33.

Commands 76 through 7D (on the DDS140) store, bytewise, 16 bit reload values (and an alternative set) for timers 0 and 1.  I have yet to determine what the timers do, except for flipping bits E.0 and E.1 each time they overflow.

On the DDS140 , I am getting the idea that Port E, largely present on the expansion port, carries some control signals. Very tentatively E.0 and E.1 programmable clock signals, E.2 sampling in progress (active low) etc

BTW because E.2 is presented on the expansion connector of the DDS140, I may be able to use this as a sampling active indicator, and from there a sync to enable better triggering

Navigation

[0] Message Index

[#] Next page

[*] Previous page

There was an error while thanking
Thanking...
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod