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!
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:
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...
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):
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
*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):
DDS120Control Settings24,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.
#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
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.