Skip to content

Commit

Permalink
new sample rates 32k, 640k, doc update, tools update
Browse files Browse the repository at this point in the history
Signed-off-by: Martin <Ho-Ro@users.noreply.github.com>
  • Loading branch information
Ho-Ro committed Mar 1, 2022
1 parent f4755d2 commit 4cb4edb
Show file tree
Hide file tree
Showing 60 changed files with 471 additions and 261 deletions.
1 change: 1 addition & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
2022-02-28: upversion to FW0210, new sample rate 128 kS/s (ID: 113) [f4755d2]
2022-02-08: more tool programs in examples [6c9d2d7]
2022-02-05: Merge branch 'main' of github.com:Ho-Ro/Hantek6022API fix last commit [078dffd]
2022-02-05: fix github workflow [0966f8b]
Expand Down
52 changes: 27 additions & 25 deletions PyHT6022/Firmware/DDS120/dds120-firmware.hex
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@
:2003E300E6E27401F08D828C838EF01216EE90E625F074012DFAE43CFB8E078A828B838F9B
:20040300F01216EE90E624F02290E61274D8F090E614E4F090E6D204F08D828C838EF0121B
:2004230016EE90E621F00DBD00010C8D828C838EF01216EEFF90E62074075FF08D828C8328
:200443008EF01216EEC423541F90E64004F0020294AF827E00EE75F005A4FCADF024D7F535
:2004630082ED341AF583E493FBB5070280080EBE17E375820022EC24D7FCED341AFD8C8284
:200443008EF01216EEC423541F90E64004F0020294AF827E00EE75F005A4FCADF02417F5F5
:2004630082ED341BF583E493FBB5070280080EBE19E375820022EC2417FCED341BFD8C8240
:200483008D83A3A3A3A3E49390E601F08C828D83A3E493FDA3E493FEA3E493FF75AF0775D9
:2004A3009DE4759E007C208C031CEB60168D828E838FF01216EEFBA3AD82AE8390E67CEB6D
:2004C300F080E47F608F061FEE600790E67CE4F080F375820122E582FF70087B64FCFDFED6
Expand Down Expand Up @@ -97,30 +97,32 @@
:2017F7000F0E000000000000020001000000000050555500000000000000000000000000B8
:201817000101000000000000020001000000000050555500000000000000000000000000B2
:20183700FAFAFAFAFAF9000002000000000001005055555555555500000000000000000065
:20185700FAFAF9000000000002000001000000005055555500000000000000000000000032
:20187700C8C8C70000000000020000010000000050555555000000000000000000000000A8
:20189700FAFAF90000000000020000010000000050555555000000000000000000000000F2
:2018B7009695000000000000020001000000000050555500000000000000000000000000E9
:2018D700BBBB0000000000000200010000000000505555000000000000000000000000007E
:2018F7000201000000000000020001000000000050555500000000000000000000000000D1
:201917004B4A0000000000000200010000000000505555000000000000000000000000001E
:20193700252500000000000002000100000000005055550000000000000000000000000049
:201957000100000000000000020100000000000050550000000000000000000000000000C7
:201977001E1D00000000000002000100000000005055550000000000000000000000000018
:20199700010100000000000002000100000000005055550000000000000000000000000031
:2019B700070700000000000002000100000000005055550000000000000000000000000005
:2019D700010000000000000002010000000000005055000000000000000000000000000047
:2019F7000504000000000000020001000000000050555500000000000000000000000000CA
:201A170080000000000000000300000000000000000000000000000000000000000000002C
:201A3700060500000000000002000100000000005055550000000000000000000000000087
:20185700FAFAFAFAFAF9000002000000000001005055555555555500000000000000000045
:20187700FAFAF9000000000002000001000000005055555500000000000000000000000012
:20189700C8C8C7000000000002000001000000005055555500000000000000000000000088
:2018B700FAFAF90000000000020000010000000050555555000000000000000000000000D2
:2018D7009695000000000000020001000000000050555500000000000000000000000000C9
:2018F700BBBB0000000000000200010000000000505555000000000000000000000000005E
:201917000201000000000000020001000000000050555500000000000000000000000000B0
:201937004B4A000000000000020001000000000050555500000000000000000000000000FE
:20195700252500000000000002000100000000005055550000000000000000000000000029
:201977000100000000000000020100000000000050550000000000000000000000000000A7
:201997001E1D000000000000020001000000000050555500000000000000000000000000F8
:2019B700010100000000000002000100000000005055550000000000000000000000000011
:2019D7002525000000000000020001000000000050555500000000000000000000000000A9
:2019F7000707000000000000020001000000000050555500000000000000000000000000C5
:201A1700010000000000000002010000000000005055000000000000000000000000000006
:201A3700050400000000000002000100000000005055550000000000000000000000000089
:201A57008000000000000000030000000000000000000000000000000000000000000000EC
:201A770003020000000000000200010000000000505555000000000000000000000000004D
:201A970002020000000000000200010000000000505555000000000000000000000000002E
:201A7700060500000000000002000100000000005055550000000000000000000000000047
:201A97008000000000000000030000000000000000000000000000000000000000000000AC
:201AB70003020000000000000200010000000000505555000000000000000000000000000D
:201AD70030571A80EA1E171A80AA18D71980CA10971980CA0F5719808A0CF71880CA0A1700
:201AF70018808A08B71A80CA06971A808A05771A808A04371A80CA03F719808A02B719801B
:201B17008A01F717808A967719808A8C3719808A781719808A71D71880CA6EB718808A6AE8
:131B3700971880CA697718808A685718808A663718808A00
:201AD7000202000000000000020001000000000050555500000000000000000000000000EE
:201AF7000302000000000000020001000000000050555500000000000000000000000000CD
:201B170030971A80EA1E571A80AA18171A80CA10B71980CA0F7719808A0C171980CA0A179D
:201B370018808A08F71A80CA06D71A808A05B71A808A04771A80CA03371A808A02F7198059
:201B57008A01F717808AA4D719808A969719808A8C5719808A783719808A71F71880CA6ECD
:1D1B7700D718808A6AB71880CA699718808A687718808A67571880CA663718808AD3
:203D000012010002FFFFFF40B50420011002010203010A0600020000004001000902890077
:203D200001010080FA0904000001FF000000070586020002000904000101FF000100070549
:203D400082010014010904000201FF00010007058201000C010904000301FF000100070502
Expand Down Expand Up @@ -211,7 +213,7 @@
:201413000490E6B3ECF090E6B4EDF02290E6A0E0FF43070190E6A0EFF0227E127F3D90E66E
:20143300B3EFF090E6B47412F02290E6B3E517F090E6B4E516F02290E6A0E0FF4307019029
:05145300E6A0EFF0220D
:200066007900E94400601B7A00901B4A780175923CE493F2A308B800020592D9F4DAF275BB
:200066007900E94400601B7A00901B94780175923CE493F2A308B800020592D9F4DAF27571
:0200860092FFE7
:12145800AA82AB83A2F73392D1F5826002D2F7ACF02299
:1B146A0020F71130F6138883A88220F509F6A8837583002280FEF280F5F02281
Expand Down
52 changes: 27 additions & 25 deletions PyHT6022/Firmware/DSO6021/dso6021-firmware.hex
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@
:20038300FB8E078A828B838FF012166F90E624F02290E61274D8F090E614E4F090E6D20480
:2003A300F08D828C838EF012166F90E621F00DBD00010C8D828C838EF012166FFF90E620F1
:2003C30074075FF08D828C838EF012166FC423541F90E64004F002021EAF827E00EE75F0F5
:2003E30005A4FCADF02458F582ED341AF583E493FBB5070280080EBE17E375820022EC246B
:2004030058FCED341AFD8C828D83A3A3A3A3E49390E601F08C828D83A3E493FDA3E493FE78
:2003E30005A4FCADF02498F582ED341AF583E493FBB5070280080EBE19E375820022EC2429
:2004030098FCED341AFD8C828D83A3A3A3A3E49390E601F08C828D83A3E493FDA3E493FE38
:20042300A3E493FF75AF07759DE4759E007C208C031CEB60168D828E838FF012166FFBA3F0
:20044300AD82AE8390E67CEBF080E47F608F061FEE600790E67CE4F080F375820122E58266
:20046300FF70087B64FCFDFE0204EEEF249B401D8F4C754D00754E00754F009003E8E4F5B5
Expand Down Expand Up @@ -93,30 +93,32 @@
:201778000F0E00000000000002000100000000005055550000000000000000000000000037
:20179800010100000000000002000100000000005055550000000000000000000000000032
:2017B800FAFAFAFAFAF90000020000000000010050555555555555000000000000000000E5
:2017D800FAFAF90000000000020000010000000050555555000000000000000000000000B2
:2017F800C8C8C7000000000002000001000000005055555500000000000000000000000028
:20181800FAFAF9000000000002000001000000005055555500000000000000000000000071
:20183800969500000000000002000100000000005055550000000000000000000000000068
:20185800BBBB000000000000020001000000000050555500000000000000000000000000FD
:20187800020100000000000002000100000000005055550000000000000000000000000050
:201898004B4A0000000000000200010000000000505555000000000000000000000000009E
:2018B8002525000000000000020001000000000050555500000000000000000000000000C9
:2018D800010000000000000002010000000000005055000000000000000000000000000047
:2018F8001E1D00000000000002000100000000005055550000000000000000000000000098
:201918000101000000000000020001000000000050555500000000000000000000000000B0
:20193800070700000000000002000100000000005055550000000000000000000000000084
:201958000100000000000000020100000000000050550000000000000000000000000000C6
:20197800050400000000000002000100000000005055550000000000000000000000000049
:201998008000000000000000030000000000000000000000000000000000000000000000AC
:2019B800060500000000000002000100000000005055550000000000000000000000000007
:2017D800FAFAFAFAFAF90000020000000000010050555555555555000000000000000000C5
:2017F800FAFAF9000000000002000001000000005055555500000000000000000000000092
:20181800C8C8C7000000000002000001000000005055555500000000000000000000000007
:20183800FAFAF9000000000002000001000000005055555500000000000000000000000051
:20185800969500000000000002000100000000005055550000000000000000000000000048
:20187800BBBB000000000000020001000000000050555500000000000000000000000000DD
:20189800020100000000000002000100000000005055550000000000000000000000000030
:2018B8004B4A0000000000000200010000000000505555000000000000000000000000007E
:2018D8002525000000000000020001000000000050555500000000000000000000000000A9
:2018F800010000000000000002010000000000005055000000000000000000000000000027
:201918001E1D00000000000002000100000000005055550000000000000000000000000077
:20193800010100000000000002000100000000005055550000000000000000000000000090
:20195800252500000000000002000100000000005055550000000000000000000000000028
:20197800070700000000000002000100000000005055550000000000000000000000000044
:20199800010000000000000002010000000000005055000000000000000000000000000086
:2019B800050400000000000002000100000000005055550000000000000000000000000009
:2019D80080000000000000000300000000000000000000000000000000000000000000006C
:2019F8000302000000000000020001000000000050555500000000000000000000000000CD
:201A18000202000000000000020001000000000050555500000000000000000000000000AD
:2019F8000605000000000000020001000000000050555500000000000000000000000000C7
:201A180080000000000000000300000000000000000000000000000000000000000000002B
:201A380003020000000000000200010000000000505555000000000000000000000000008C
:201A580030D81980EA1E981980AA18581980CA10181980CA0FD818808A0C781880CA0A98FB
:201A780017808A08381A80CA06181A808A05F819808A04B81980CA037819808A0238198097
:201A98008A017817808A96F818808A8CB818808A789818808A71581880CA6E3818808A6A65
:131AB800181880CA69F817808A68D817808A66B817808A7F
:201A580002020000000000000200010000000000505555000000000000000000000000006D
:201A780003020000000000000200010000000000505555000000000000000000000000004C
:201A980030181A80EA1ED81980AA18981980CA10381980CA0FF818808A0C981880CA0A989A
:201AB80017808A08781A80CA06581A808A05381A808A04F81980CA03B819808A02781980D6
:201AD8008A017817808AA45819808A961819808A8CD818808A78B818808A71781880CA6E49
:1D1AF8005818808A6A381880CA691818808A68F817808A67D81780CA66B817808A50
:203D000012010002FFFFFF40B50421601002010203010A0600020000004001000902890017
:203D200001010080FA0904000001FF000000070586020002000904000101FF000100070549
:203D400082010014010904000201FF00010007058201000C010904000301FF000100070502
Expand Down Expand Up @@ -207,7 +209,7 @@
:201394000490E6B3ECF090E6B4EDF02290E6A0E0FF43070190E6A0EFF0227E127F3D90E6EE
:2013B400B3EFF090E6B47412F02290E6B3E517F090E6B4E516F02290E6A0E0FF43070190A9
:0513D400E6A0EFF0228D
:200066007900E94400601B7A00901ACB780175923CE493F2A308B800020592D9F4DAF2753B
:200066007900E94400601B7A00901B15780175923CE493F2A308B800020592D9F4DAF275F0
:0200860092FFE7
:1213D900AA82AB83A2F73392D1F5826002D2F7ACF02219
:1B13EB0020F71130F6138883A88220F509F6A8837583002280FEF280F5F02201
Expand Down
52 changes: 27 additions & 25 deletions PyHT6022/Firmware/DSO6022BE/dso6022be-firmware.hex
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@
:2003A300F074012DFAE43CFB8E078A828B838FF01216A390E624F02290E61274D8F090E6B4
:2003C30014E4F090E6D204F08D828C838EF01216A390E621F00DBD00010C8D828C838EF095
:2003E3001216A3FF90E62074075FF08D828C838EF01216A3C423541F90E64004F00202451C
:20040300AF827E00EE75F005A4FCADF0248CF582ED341AF583E493FBB5070280080EBE1720
:20042300E375820022EC248CFCED341AFD8C828D83A3A3A3A3E49390E601F08C828D83A3A4
:20040300AF827E00EE75F005A4FCADF024CCF582ED341AF583E493FBB5070280080EBE19DE
:20042300E375820022EC24CCFCED341AFD8C828D83A3A3A3A3E49390E601F08C828D83A364
:20044300E493FDA3E493FEA3E493FF75AF07759DE4759E007C208C031CEB60168D828E83F8
:200463008FF01216A3FBA3AD82AE8390E67CEBF080E47F608F061FEE600790E67CE4F080D2
:20048300F375820122E582FF70087B64FCFDFE020515EF249B401D8F4C754D00754E00759C
Expand Down Expand Up @@ -94,30 +94,32 @@
:2017AC000F0E00000000000002000100000000005055550000000000000000000000000003
:2017CC000101000000000000020001000000000050555500000000000000000000000000FE
:2017EC00FAFAFAFAFAF90000020000000000010050555555555555000000000000000000B1
:20180C00FAFAF900000000000200000100000000505555550000000000000000000000007D
:20182C00C8C8C70000000000020000010000000050555555000000000000000000000000F3
:20184C00FAFAF900000000000200000100000000505555550000000000000000000000003D
:20186C00969500000000000002000100000000005055550000000000000000000000000034
:20188C00BBBB000000000000020001000000000050555500000000000000000000000000C9
:2018AC0002010000000000000200010000000000505555000000000000000000000000001C
:2018CC004B4A0000000000000200010000000000505555000000000000000000000000006A
:2018EC00252500000000000002000100000000005055550000000000000000000000000095
:20190C00010000000000000002010000000000005055000000000000000000000000000012
:20192C001E1D00000000000002000100000000005055550000000000000000000000000063
:20194C0001010000000000000200010000000000505555000000000000000000000000007C
:20196C00070700000000000002000100000000005055550000000000000000000000000050
:20198C00010000000000000002010000000000005055000000000000000000000000000092
:2019AC00050400000000000002000100000000005055550000000000000000000000000015
:2019CC00800000000000000003000000000000000000000000000000000000000000000078
:2019EC000605000000000000020001000000000050555500000000000000000000000000D3
:20180C00FAFAFAFAFAF9000002000000000001005055555555555500000000000000000090
:20182C00FAFAF900000000000200000100000000505555550000000000000000000000005D
:20184C00C8C8C70000000000020000010000000050555555000000000000000000000000D3
:20186C00FAFAF900000000000200000100000000505555550000000000000000000000001D
:20188C00969500000000000002000100000000005055550000000000000000000000000014
:2018AC00BBBB000000000000020001000000000050555500000000000000000000000000A9
:2018CC000201000000000000020001000000000050555500000000000000000000000000FC
:2018EC004B4A0000000000000200010000000000505555000000000000000000000000004A
:20190C00252500000000000002000100000000005055550000000000000000000000000074
:20192C000100000000000000020100000000000050550000000000000000000000000000F2
:20194C001E1D00000000000002000100000000005055550000000000000000000000000043
:20196C0001010000000000000200010000000000505555000000000000000000000000005C
:20198C002525000000000000020001000000000050555500000000000000000000000000F4
:2019AC00070700000000000002000100000000005055550000000000000000000000000010
:2019CC00010000000000000002010000000000005055000000000000000000000000000052
:2019EC000504000000000000020001000000000050555500000000000000000000000000D5
:201A0C00800000000000000003000000000000000000000000000000000000000000000037
:201A2C00030200000000000002000100000000005055550000000000000000000000000098
:201A4C00020200000000000002000100000000005055550000000000000000000000000079
:201A2C00060500000000000002000100000000005055550000000000000000000000000092
:201A4C008000000000000000030000000000000000000000000000000000000000000000F7
:201A6C00030200000000000002000100000000005055550000000000000000000000000058
:201A8C00300C1A80EA1ECC1980AA188C1980CA104C1980CA0F0C19808A0CAC1880CA0ACC59
:201AAC0017808A086C1A80CA064C1A808A052C1A808A04EC1980CA03AC19808A026C19802A
:201ACC008A01AC17808A962C19808A8CEC18808A78CC18808A718C1880CA6E6C18808A6AF8
:131AEC004C1880CA692C18808A680C18808A66EC17808A79
:201A8C00020200000000000002000100000000005055550000000000000000000000000039
:201AAC00030200000000000002000100000000005055550000000000000000000000000018
:201ACC00304C1A80EA1E0C1A80AA18CC1980CA106C1980CA0F2C19808A0CCC1880CA0ACCF8
:201AEC0017808A08AC1A80CA068C1A808A056C1A808A042C1A80CA03EC19808A02AC198069
:201B0C008A01AC17808AA48C19808A964C19808A8C0C19808A78EC18808A71AC1880CA6EDB
:1D1B2C008C18808A6A6C1880CA694C18808A682C18808A670C1880CA66EC17808AE1
:203D000012010002FFFFFF40B50422601002010203010A0600020000004001000902890016
:203D200001010080FA0904000001FF000000070586020002000904000101FF000100070549
:203D400082010014010904000201FF00010007058201000C010904000301FF000100070502
Expand Down Expand Up @@ -208,7 +210,7 @@
:2013C8000490E6B3ECF090E6B4EDF02290E6A0E0FF43070190E6A0EFF0227E127F3D90E6BA
:2013E800B3EFF090E6B47412F02290E6B3E517F090E6B4E516F02290E6A0E0FF4307019075
:05140800E6A0EFF02258
:200066007900E94400601B7A00901AFF780175923CE493F2A308B800020592D9F4DAF27507
:200066007900E94400601B7A00901B49780175923CE493F2A308B800020592D9F4DAF275BC
:0200860092FFE7
:12140D00AA82AB83A2F73392D1F5826002D2F7ACF022E4
:1B141F0020F71130F6138883A88220F509F6A8837583002280FEF280F5F022CC
Expand Down
14 changes: 9 additions & 5 deletions PyHT6022/Firmware/DSO6022BE/scope6022.inc
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ static const struct samplerate_info samplerates[] = {
{3, waveform_3, ifconfig_3}, // 3 MS/s
{2, waveform_2, ifconfig_2}, // 2 MS/s
{1, waveform_1, ifconfig_1}, // 1 MS/s
{164, waveform_164, ifconfig_164}, // 640 kS/s
{150, waveform_150, ifconfig_150}, // 500 kS/s
{140, waveform_140, ifconfig_140}, // 400 kS/s
{120, waveform_120, ifconfig_120}, // 200 kS/s
Expand All @@ -223,6 +224,7 @@ static const struct samplerate_info samplerates[] = {
{106, waveform_106, ifconfig_106}, // 64 kS/s
{105, waveform_105, ifconfig_105}, // 50 kS/s
{104, waveform_104, ifconfig_104}, // 40 kS/s
{103, waveform_103, ifconfig_103}, // 32 kS/s
{102, waveform_102, ifconfig_102}, // 20 kS/s
};

Expand Down Expand Up @@ -257,16 +259,18 @@ static BOOL set_samplerate( BYTE rate ) {

// new functon to set the calibration pulse frequency that allows
// to set all possible frequencies between 40 Hz and 100 kHz
// integer dividers of 2MHz Hz will be exact
// frequencies between 40 Hz and 1000 Hz can be multiples of 10 Hz
// frequencies between 100 Hz to 10 kHz can be multiples of 100 Hz
// frequencies between 1 kHz to 100 kHz can be multiples of 1 kHz
// integer dividers of 2e6 Hz will be exact
// calibration frequency is coded into one byte parameter freq:
// freq == 0 -> 100 Hz (compatibility to old sigrok coding)
// freq == 103 -> 32 Hz (lowest possible frequency due to 16bit HW timer2)
// freq 1..100 -> freq in kHz
// freq 101..200 -> (value-100)*10 is freq in Hz
// freq 101, 102 -> not possible
// freq == 103 -> 32 Hz (lowest possible frequency due to 16bit HW timer2)
// freq 104..200 -> (value-100)*10 is freq in Hz
// freq 201..255 -> (value-200)*100 is freq in Hz
// e.g. 105 -> 50 Hz, 20 -> 20 kHz
// e.g. 105 -> 50 Hz, 216 -> 1600 Hz, 20 -> 20 kHz
//
static BOOL set_calibration_pulse( BYTE freq ) {
long frequency;
Expand All @@ -276,7 +280,7 @@ static BOOL set_calibration_pulse( BYTE freq ) {
frequency = freq * 1000L;
else if ( freq == 103 ) // special case for 32 Hz
frequency = 32;
else if ( freq <= 200 ) // 101..200 -> 10, 20, 30 ... 1000 Hz
else if ( freq <= 200 ) // 101..200 -> (10, 20, 30,) 40 ... 1000 Hz
frequency = ( freq - 100 ) * 10L;
else // 201..255 -> 100, 200, 300 ... 5500 Hz
frequency = ( freq - 200 ) * 100L;
Expand Down
Loading

0 comments on commit 4cb4edb

Please sign in to comment.