-
Notifications
You must be signed in to change notification settings - Fork 9
/
FileFormat.txt
52 lines (40 loc) · 2.09 KB
/
FileFormat.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
0-999 Header data
1000 - 3999 CH1 data1
4000 - 6999 CH2 data1
7000 - 8499 CH1 data2
8500 - 9999 CH2 data2
10000 - 14999 seems to be just nulls in my captures so far.
The header data
CH1 vertical scale at 4 where 0-6 represents 5.0V,2.5V,1.0V,500mV,200mV,100mV,50mV/div
CH2 vertical scale at 14 (same as CH1
CH1 coupling at 8 0 - 1 DC,AC
CH2 coupling at 18 0 - 1 DC,AC
CH1 Probe at 10 0 - 2 x1,x10,x100
CH2 Probe at 20 0 - 2 x1,x10,x100
Time scale at 22 (repeated at 52 where 0 - 29 represents
50S,20S,10S,5S,2S,1S,500mS,200mS,100mS,50mS,20mS,10ms,5mS,2mS,1mS,
500uS,200uS,100uS,50uS,20uS,10uS,5uS,2uS,1uS,500nS,200nS,100nS,50nS,20nS,10nS
Trigger type at 26 0 - 2 Auto,Single,Normal
Trigger edge at 28 0 - 1 RISING, FALLING
Screen Brightness at 120 0-99
Grid Brightness at 122 0-99
Scroll speed at 24 0 - 1 Fast, Slow
Ch1 measurements at 208 - 255 (12 4byte fields)
Ch2 measurements at 256 - 303 (12 4byte fields)
VMax,VMin,Vavg,Vrms,Vpp,Vp,Freq,Cysle,Time+,Time-,Duty+,Duty-
INT32 - Mid-Big Endian (BADC) is used for encoding
VMax,VMin,Vavg,Vrms,Vpp,Vp values are in millivolts (divide by 1000 for values in volts)
Freq is not so simple here, I assume that values from 0 to 256 (maybe higher) give MHz up to about 1000 give KHz and then the values are in millihertz, that is, you need to divide by 1000 to get hertz.
here's an example:
00 00 00 01 - 256 Mhz (256)
00 00 01 00 - 1 Mhz (1)
00 10 00 00 - 268 Khz (268435456)
00 01 00 00 - 16.7 Khz (16777216)
10 00 00 00 - 1.04 Khz (1048576)
00 00 e9 03 - 1 Khz (1001)
01 00 18 87 - 100 hz (100120)
01 00 00 00 - 65.5 hz (65536)
Cysle, Time+, Time - I assume that here, just like with frequency, it is necessary to convert to nS, uS, mS, S.
Duty+, Duty- are measured as percentages
dataBlock1 1500 2 byte fields (little endian) which represent the total captured values. Values range from 0 - 399 where level 200 represents 0 and 50 units represents the scale of the sensitivity.
dataBlock2 750 2 byte fields (little endian ) which represent the displayed values values. Values are the Y co-ordinates from the top of the screen so they are inverted compared to the buffer values.