-
Notifications
You must be signed in to change notification settings - Fork 159
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial support for Instrustar 205A/B
- Loading branch information
Showing
5 changed files
with
354 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,214 @@ | ||
:203D000012010002FFFFFF40501D8E600500010203010A0600020000004001000902890003 | ||
:203D200001010080370904000001FF000000070586020002000904000101FF00010007050C | ||
:203D400082010014010904000201FF00010007058201000C010904000301FF000100070502 | ||
:203D600082010004010904000401FF000100070582010004020904000501FF0001000705F5 | ||
:203D800082010004030904000601FF000100070582010004040904000701FF0001000705CD | ||
:053DA000820100020495 | ||
:203DA6000902390002010080370904000001FF000000070586024000000904000101FF0010 | ||
:193DC600010007058201FF03010904000201FF00010007058201000201AF | ||
:203DE000040309040E0373006900670072006F006B0010036600780032006C0061006600B9 | ||
:203E00007700280349006E00730074007200750073007400610072002000490053004400C1 | ||
:0C3E20005300320030003500420000006A | ||
:040000000201B9320E | ||
:01000B0032C2 | ||
:0100130032BA | ||
:01001B0032B2 | ||
:0100230032AA | ||
:03002B000203E1EC | ||
:03003300020318AD | ||
:01003B003292 | ||
:01004300328A | ||
:01004B003282 | ||
:01005300327A | ||
:01005B003272 | ||
:01006300326A | ||
:03006B0002031B72 | ||
:03007300020C7507 | ||
:03007B00020889EF | ||
:030083000203C9AC | ||
:03008B000203333A | ||
:0300930002037EE7 | ||
:03009B00020886D2 | ||
:0300A300020C9FAD | ||
:0300AB00020CA0A4 | ||
:0300B300020CA19B | ||
:0300BB00020CA490 | ||
:0300C300020C74B8 | ||
:0300CB00020C9193 | ||
:0300D300020C928A | ||
:0300DB00020C9480 | ||
:0300E30002088B85 | ||
:0300EB00020D18EB | ||
:0300F30002088779 | ||
:0300FB0002088870 | ||
:0301030002088A65 | ||
:03010B0002088C5B | ||
:0301130002088D52 | ||
:03011B00020CFBD8 | ||
:03012300020C9D2E | ||
:03012B00020CA221 | ||
:03013300020CA516 | ||
:03013B00020CA70C | ||
:03014300020C9E0D | ||
:03014B00020CA300 | ||
:03015300020CA6F5 | ||
:03015B00020CA8EB | ||
:03016300020CFA91 | ||
:03016B00020C95EE | ||
:03017300020C97E4 | ||
:03017B00020C99DA | ||
:03018300020C9BD0 | ||
:03018B00020C96CD | ||
:03019300020C98C3 | ||
:03019B00020C9AB9 | ||
:0301A300020C9CAF | ||
:0301AB00020C93B0 | ||
:0301B300020C73C8 | ||
:0F021200750800750A00E4F50BF50CC200C20177 | ||
:030233000201B60F | ||
:0301B600020792AB | ||
:20023600AF82BF0002800FBF01028014BF0A028019BF192A801E75CA7875CBEC75820122D0 | ||
:2002560075CA0C75CBFE7582012275CACE75CBFF7582012275CAF675CBFF758201227582FA | ||
:200276000022AF827E00C286EF23540124FF9284D2868F05ED2DFF0EBE080040E9D285C294 | ||
:200296008522AF827401B50902801C7402B5090280197405B509028016740AB50902801330 | ||
:2002B600740BB5091680107E0980147E0680107E00800C7E5F80087E50800475820022EF4D | ||
:2002D60060067D1C7F0080047D437F00EDF4FFE5085207ED5E4FF508850882120278758278 | ||
:2002F6000122E582FF30E00553087F8003430880EF30E4055308DF800343082085088202E1 | ||
:200316000278C2DC32C0E0C082C083D2005391EF90E65D7401F0D083D082D0E032C021C053 | ||
:20033600E0C0F0C082C083C007C006C005C004C003C002C001C000C0D075D0007582001298 | ||
:200356000B715391EF90E65D7410F0D0D0D000D001D002D003D004D005D006D007D083D092 | ||
:2003760082D0F0D0E0D02132C021C0E0C0F0C082C083C007C006C005C004C003C002C00140 | ||
:20039600C000C0D075D000758201120B715391EF90E65D7420F0D0D0D000D001D002D0031C | ||
:2003B600D004D005D006D007D083D082D0F0D0E0D02132C0E0C082C083D2015391EF90E658 | ||
:2003D6005D7408F0D083D082D0E032C0E0C007C006C0D075D000B280E50B450C6013E50BDF | ||
:2003F60024FFFEE50C34FFFF8E0B8F0CEE4F700100C2CFD0D0D006D007D0E032E582FF306B | ||
:20041600E00543B108800353B1F7EF30E40443B1012253B1FE22AF82BF01028003BF0211DD | ||
:2004360074072FFF90E618F090E61AEFF0758201227582002290E6F574FFF000000090E699 | ||
:20045600047480F000000090E6047482F000000090E6047486F000000090E604E4F02290DA | ||
:20047600E6F574FFF0000000E50A70057E06FF80047E027F0090E648EEF022D28712044B46 | ||
:200496007EE87F031EBEFF011FEE4F70F7E5BB30E7FB00000090E6D07428F000000090E6C5 | ||
:2004B600D1E4F0E50A70057E06FF80047E047F008EBBE4F50BF50C22AF8290E680E030E7A7 | ||
:2004D600067D1C7E3D80047DA67E3D8F03E4CBC4CB6BCB54F0CB6BFC74162BFBE43CFCEB17 | ||
:2004F6002DFDEC3EFC7E80EFF50A703590E612E4F090E61474E0F090E6E27401F08D828C83 | ||
:20051600838EF0120CFC90E625F074012DFAE43CFB8E078A828B838FF0120CFC90E624F096 | ||
:200536002290E61274D8F090E614E4F090E6D204F08D828C838EF0120CFC90E621F00DBD1E | ||
:2005560000010C8D828C838EF0120CFCFF90E62074075FF08D828C838EF0120CFCC4235472 | ||
:200576001F90E64004F022AF827E00EE75F007A4FCADF0241DF582ED340DF583E493FBB5AF | ||
:20059600070280080EBE0CE375820022EC241DFCED340DFD74062CF582E43DF583E49390CF | ||
:2005B600E601F075AF07759DE4759E008C828D83A3E49390E67CF08C828D83A3A3E4939095 | ||
:2005D600E67CF07401F0E4F0F0F0F0F08C828D83A3A3A39390E67CF08C828D83A3A3A3A394 | ||
:2005F600E49390E67CF07401F0E4F0F0F0F0F08C828D83A3A3A3A3A39390E67CF07411F05C | ||
:20061600F0E4F0F0F0F0F0F0F0F0F0F0F0F0F0FF90E67CE4F00FBF600040F575820122AFCF | ||
:2006360082BF0002800FBF01028014BF0A028019BF322A801E75CAF075CBD8758201227589 | ||
:20065600CA1875CBFC7582012275CA9C75CBFF7582012275CAEC75CBFF758201227582009D | ||
:2006760022AD15AE16AF178D828E838FF0E50A120C7675820122E5827006850D821204CEE5 | ||
:20069600758201227582002275820122AF82C007120475D007750BE8750C03BFE0004015BD | ||
:2006B600EF2419401090E68AE4F090E68BF090E6A0E020E1F9BFE0005003020748EF241984 | ||
:2006D6005003020748EF2420FE2E9006E473800C800A801B80268033803E8049EF2420FF51 | ||
:2006F60090E740E0F5098F821202987582012290E740E0F58212057D7582012290E740E025 | ||
:20071600FFBF01031204917582012290E740E0F58212042C7582012290E740E0F5821202B4 | ||
:20073600F87582012290E740E0F582120236758201227582002290E613E4F090E615F0D25C | ||
:200756008790E6C2E4F090E6C37480F090E6C0E4F090E6F4F012047575090175820012025A | ||
:200776009875090175820112029875820112057D75820212042C7582000204CE90E600E0C0 | ||
:2007960053E0E7F012074CE500D2E890E668E043E008F090E65CE043E001F090E65CE043A1 | ||
:2007B600E010F090E65CE043E020F090E65CE043E008F0D2DDD2AF75CA0C75CBFE75C8009B | ||
:2007D600D2ADD2CA90E680E043E00AF09005DC120CA990E680E053E0F7F090E672E4F09081 | ||
:2007F600E671F090E670F075B6FF75B4FF75B2FF100002800312088E10010280F390E68293 | ||
:20081600E043E0C0F090E6817401F043870100000000000000E510701C90E682E030E60772 | ||
:2008360090E682E020E0D690E682E030E70790E682E020E1C890E682E030E60790E682E090 | ||
:2008560020E00E90E682E030E7A690E682E030E19F900005120CA990E680E043E001F09081 | ||
:10087600000F120CA990E680E053E0FEF002080695 | ||
:200D1D00308000030000EA1E8000030000AA180100020110CA100101020010CA0C020102D9 | ||
:200D3D000010CA080302020010CA040605020010CA020C0B020010CA011817020010CA32B5 | ||
:140D5D00302F020010CA147877020010CA0AF0EF020010CAA3 | ||
:01088600323F | ||
:01088700323E | ||
:01088800323D | ||
:01088900323C | ||
:01088A00323B | ||
:01088B00323A | ||
:01088C003239 | ||
:01088D003238 | ||
:0601E800E478FFF6D8FDEB | ||
:12022100750F007510007511A675123D75131C75143D68 | ||
:20088E0090E6B9E0FF24F45003020984EF240A83F582EF241083F583E473C0D584EA8484AB | ||
:2008AE00FF84051C33660808090809090809090909091209F7E582600302099990E6A0E00F | ||
:2008CE0043E001F0020999120A8BE582600302099990E6A0E043E001F0020999120AD9E5B5 | ||
:2008EE0082600302099990E6A0E043E001F0020999120B9C02099912069AAF8290E740EFCD | ||
:20090E00F090E68AE4F090E68B04F002099990E6BAE0F58212069EE582707090E6A0E043AF | ||
:20092E00E001F0806690E6BCE0FF75150E7516007517408F82120677E582700A90E6A0E07B | ||
:20094E0043E001F0804590E740E50EF090E68AE4F090E68B04F0803390E6BCE0FF90E6BA59 | ||
:20096E00E0F50D8F8212068CE582701F90E6A0E043E001F0801590E6B9E0F5821206A2E518 | ||
:20098E0082700890E6A0E043E001F090E6A0E043E080F022AF82747F5FFE24F74047EE2465 | ||
:2009AE000A83F582EE240D83F583E473CCD0E3F3E7F3EBF3EF09090909090909090990E6D4 | ||
:2009CE00A022EF30E7067EA27FE680047EA17FE68E828F832290E6A32290E6A42290E6A5D8 | ||
:2009EE002290E6A6229000002290E6B8E0FFBF80028022BF81028008BF82028037020A8394 | ||
:200A0E0090E740E4F090E741F090E68AF090E68B7402F08064E51025E0FFE50F420790E7AD | ||
:200A2E0040EFF090E741E4F090E68AF090E68B7402F0804590E6BCE0F5821209A2AE82AFBC | ||
:200A4E00838E048F05EE4F7003F582228C828D83E0FC30E0067E017F0080047E007F009077 | ||
:200A6E00E740EEF090E741E4F090E68AF090E68B7402F08004758200227582012290E6B89B | ||
:200A8E00E0FF6005BF0237801190E6BAE0FFBF010575100080317582002290E6BAE0701ABE | ||
:200AAE0090E6BCE0F5821209A2AE82AF83E0FD5305FE8E828F83EDF0800D7582002290E632 | ||
:200ACE00B9E0F5820206A27582012290E6B8E0FF6008BF02028020020B6490E6BAE0FFBF1D | ||
:200AEE000203020B6D90E6BAE0FFBF0106751001020B6D7582002290E6BAE0705590E6BC74 | ||
:200B0E00E0F5821209A2AE82AF83EE4F7003F582228E828F83E0FD4305018E828F83EDF0C1 | ||
:200B2E0090E6BCE0FF53070F90E6BCE0FE530680E4C423CEC423541F6ECE541FCE6ECE3068 | ||
:200B4E00E40244E0FD90E683EE2FF0E043E020F0800D7582002290E6B9E0F5820206A2751C | ||
:200B6E00820122AF82D20210AF02C202EF600E75111C75123D7513A675143D800C7511A6C9 | ||
:200B8E0075123D75131C75143DA20292AF2290E6BBE0FFBF01028019BF02028024BF03027C | ||
:200BAE00802CBF0603020C4DBF0703020C5D020C6A7E007F3D90E6B3EFF090E6B47400F0DC | ||
:200BCE002290E6B3E512F090E6B4E511F0227DE07E3D7F8090E6BAE0F5157B00EBB5150240 | ||
:200BEE0080430B8D008E018F028D828E838FF0120CFC28F8E439F9880589068A0774012D2E | ||
:200C0E00F9E43EFA8F0489828A838CF0120CFCF9B9030280067D007E007F00ED4E6006C355 | ||
:200C2E00E5159B50B7ED4E600D8E0490E6B3ECF090E6B4EDF02290E6A0E043E001F0227EF8 | ||
:200C4E00127F3D90E6B3EFF090E6B47412F02290E6B3E514F090E6B4E513F02290E6A0E0B2 | ||
:050C6E0043E001F0224B | ||
:2001C6007900E94400601B7A00900D71780075923CE493F2A308B800020592D9F4DAF27542 | ||
:0201E60092FF86 | ||
:010C7300324E | ||
:010C7400324D | ||
:010C7500324C | ||
:1B0C760020F71130F6138883A88220F509F6A8837583002280FEF280F5F0227D | ||
:010C91003230 | ||
:010C9200322F | ||
:010C9300322E | ||
:010C9400322D | ||
:03004300023F0079 | ||
:203F000002031B00020C7500020889000203C9000203330002037E0002088600020C9E00A6 | ||
:203F2000020C9F00020CA000020CA100020CA400020C7400020C9100020C9200020C940062 | ||
:203F400002088B00020C9E00020D1800020887000208880002088A0002088C0002088D0015 | ||
:203F6000020CFB00020C9E00020C9E00020C9E00020C9D00020CA200020CA500020CA70071 | ||
:203F8000020CA300020CA600020CA800020CFA00020C9500020C9700020C9900020C9B0066 | ||
:183FA000020C9600020C9800020C9A00020C9C00020C9300020C73004B | ||
:010C9500322C | ||
:010C9600322B | ||
:2001EE007800E84400600A790075923CE4F309D8FC7800E84400600C7900903C00E4F0A3A7 | ||
:04020E00D8FCD9FA45 | ||
:010C9700322A | ||
:010C98003229 | ||
:010C99003228 | ||
:010C9A003227 | ||
:010C9B003226 | ||
:010C9C003225 | ||
:010C9D003224 | ||
:010C9E003223 | ||
:010C9F003222 | ||
:010CA0003221 | ||
:010CA1003220 | ||
:010CA200321F | ||
:010CA300321E | ||
:010CA400321D | ||
:010CA500321C | ||
:010CA600321B | ||
:010CA700321A | ||
:010CA8003219 | ||
:200CA900AE82AF8390E600E05418C423541F70057CB1FD801C90E600E05418C423541FFB5B | ||
:200CC900BB01067A617B0180047AC27B028A048B058C158D16E51524FFFAE51634FFFB8A89 | ||
:110CE900158B16EA4B70EE1EBEFF011FEE4F70E12206 | ||
:010CFA0032C7 | ||
:010CFB0032C6 | ||
:0D01B900758121120D19E58260030201B667 | ||
:1C0CFC0020F71430F6148883A88220F507E6A88375830022E280F7E49322E02207 | ||
:010D180032A8 | ||
:040D190075820022BD | ||
:00000001FF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,120 @@ | ||
// SPDX-License-Identifier: GPL-2.0-or-later | ||
|
||
#include "modelISDS205b.h" | ||
#include "hantekdsocontrol.h" | ||
#include "hantekprotocol/controlStructs.h" | ||
#include "usb/scopedevice.h" | ||
#include <QDebug> | ||
#include <QDir> | ||
#include <QSettings> | ||
|
||
#include "../res/firmware/dso602x_fw_version.h" | ||
|
||
|
||
#define VERBOSE 0 | ||
|
||
using namespace Hantek; | ||
|
||
static ModelISDS205B modelInstance_isds205b; | ||
|
||
|
||
static void initSpecifications( Dso::ControlSpecification &specification ) { | ||
// we drop 2K + 480 sample values due to unreliable start of stream | ||
// 20000 samples at 100kS/s = 200 ms gives enough to fill | ||
// the screen two times (for pre/post trigger) at 10ms/div = 100ms/screen | ||
// SAMPLESIZE defined in hantekdsocontrol.h | ||
// adapt accordingly in HantekDsoControl::convertRawDataToSamples() | ||
|
||
// HW gain, voltage steps in V/div (ranges 20,50,100,200,500,1000,2000,5000 mV) | ||
|
||
specification.gain = { { 10, 20e-3 }, { 10, 50e-3 }, { 10, 100e-3 }, { 5, 200e-3 },{ 2, 500e-3 }, { 1, 1.00 }, { 1, 2.00 }, { 1, 5.00 } }; | ||
|
||
// ID and actual gain: | ||
// 1: 1.1 | ||
// 2: 2 | ||
// 5: 4.9 | ||
// 10: 16 | ||
// Full scale input == +- 5V according to instrustar. | ||
// For low voltages a relay can be switched, so a 10x attenuator is bypassed. i.e. input at ADC +- 0.5V always | ||
|
||
// Define the scaling between ADC sample values and real input voltage | ||
// Everything is scaled on the full screen height (8 divs) | ||
// ||WITH LV SWITCH|| | ||
// The voltage/div setting: 20m 50m 100m 200m 500m 1V 2V 5V | ||
// Equivalent input voltage: 0.16V 0.4V 0.8V 1.6V 4V 8V 16V 40V | ||
// Theoretical gain setting: x16 x16 x16 x4.9 x2 x1.1 x1.1 x1.1 | ||
// mV / digit: ? ? ? ? ? ? ? ? | ||
|
||
specification.voltageScale[ 0 ] = { 1276, 1276,1276, 90, 37, 21.5, 21.5, 21.5 }; | ||
specification.voltageScale[ 1 ] = { 1276, 1276,1276, 90, 37, 21.5, 21.5, 21.5 }; | ||
// Gain and offset can be corrected by individual config values from EEPROM or file | ||
|
||
// Possible raw sample rates with custom fw from https://github.com/Ho-Ro/Hantek6022API | ||
// 20k, 40k, 50k, 64k, 100k, 200k, 400k, 500k, 1M, 2M, 3M, 4M, 5M, 6M, 8M, 10M, 12M, 15M, 16M, 24M, 30M (, 48M) | ||
// 48M is unusable in 1 channel mode due to massive USB overrun | ||
// 24M, 30M and 48M are unusable in 2 channel mode | ||
// these unstable settings are disabled | ||
// Lower effective sample rates < 10 MS/s use oversampling to increase the SNR | ||
|
||
specification.samplerate.single.base = 1e6; | ||
specification.samplerate.single.max = 30e6; | ||
specification.samplerate.single.recordLengths = { UINT_MAX }; | ||
specification.samplerate.multi.base = 1e6; | ||
specification.samplerate.multi.max = 15e6; | ||
specification.samplerate.multi.recordLengths = { UINT_MAX }; | ||
|
||
specification.fixedSampleRates = { | ||
// samplerate, sampleId, downsampling | ||
|
||
{ 100e3, 10, 1 }, | ||
{ 200e3, 20, 1 }, | ||
{ 500e3, 50, 1 }, | ||
{ 1e6, 1, 1 }, | ||
{ 2e6, 8, 4 }, // 4x downsampling from 8 MS/s | ||
{ 7e6, 24, 3 }, // 3x downsampling from 24 MS/s | ||
{ 4e6, 4, 1 }, | ||
{ 8e6, 8, 1 }, | ||
{ 16e6, 16, 1 }, // no downsampling | ||
{ 24e6, 24, 1 }, // no downsampling | ||
{ 30e6, 30, 1 }, // no downsampling | ||
{ 48e6, 48, 1 } // no downsampling | ||
}; | ||
|
||
// Instrustar has AC Coupling option | ||
specification.couplings = { Dso::Coupling::DC, Dso::Coupling::AC }; | ||
specification.hasACcoupling = true; | ||
|
||
specification.triggerModes = { | ||
Dso::TriggerMode::AUTO, | ||
Dso::TriggerMode::NORMAL, | ||
Dso::TriggerMode::SINGLE, | ||
Dso::TriggerMode::ROLL, | ||
}; | ||
specification.fixedUSBinLength = 0; | ||
//Use calibration steps supported by firmware 205b | ||
specification.calfreqSteps = { 100,1000,10000,25000 }; | ||
specification.hasCalibrationEEPROM = false; | ||
|
||
} | ||
|
||
static void applyRequirements_( HantekDsoControl *dsoControl ) { | ||
dsoControl->addCommand( new ControlSetGain_CH1() ); // 0xE0 | ||
dsoControl->addCommand( new ControlSetGain_CH2() ); // 0xE1 | ||
dsoControl->addCommand( new ControlSetSamplerate() ); // 0xE2 | ||
dsoControl->addCommand( new ControlStartSampling() ); // 0xE3 | ||
dsoControl->addCommand( new ControlSetNumChannels() ); // 0xE4 | ||
dsoControl->addCommand( new ControlSetCoupling() ); // 0xE5 (no effect w/o AC/DC HW mod) | ||
dsoControl->addCommand( new ControlSetCalFreq() ); // 0xE6 | ||
} | ||
|
||
|
||
// Instrustar ISDS20A/B | ||
// | ||
// VID/PID active VID/PID no FW FW ver FW name Scope name | ||
// |------------| |------------| |------------| |-------| |--------| | ||
ModelISDS205B::ModelISDS205B() | ||
: DSOModel( ID, 0x1d50, 0x608e, 0xd4a2, 0x5661, 0x0005, "isds205b", "ISDS-205B", Dso::ControlSpecification( 2 ) ) { | ||
initSpecifications( specification ); | ||
} | ||
|
||
void ModelISDS205B::applyRequirements( HantekDsoControl *dsoControl ) const { applyRequirements_( dsoControl ); } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// SPDX-License-Identifier: GPL-2.0-or-later | ||
|
||
#pragma once | ||
|
||
#include "dsomodel.h" | ||
|
||
class HantekDsoControl; | ||
using namespace Hantek; | ||
|
||
|
||
struct ModelISDS205B : public DSOModel { | ||
static const int ID = 0x2050; | ||
ModelISDS205B(); | ||
void applyRequirements( HantekDsoControl *dsoControl ) const override; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters