From ad2df18a5a40ebf348f70269321ec4cae6a7a78c Mon Sep 17 00:00:00 2001 From: elechapt Date: Wed, 10 Apr 2024 16:38:44 +0200 Subject: [PATCH 1/2] Handling the connection with USB2 wire for ps5000D --- picoscope/picobase.py | 2 ++ picoscope/ps5000a.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/picoscope/picobase.py b/picoscope/picobase.py index 4a71440..1c5ae11 100644 --- a/picoscope/picobase.py +++ b/picoscope/picobase.py @@ -1183,4 +1183,6 @@ def changePowerSource(self, powerstate): powerstate = 0x119 elif powerstate == "PICO_POWER_SUPPLY_NOT_CONNECTED": powerstate = 0x11A + elif powerstate == "PICO_USB3_0_DEVICE_NON_USB3_0_PORT": + powerstate = 0x11E self._lowLevelChangePowerSource(powerstate) diff --git a/picoscope/ps5000a.py b/picoscope/ps5000a.py index 0a91603..13e8c32 100644 --- a/picoscope/ps5000a.py +++ b/picoscope/ps5000a.py @@ -177,7 +177,7 @@ def _lowLevelOpenUnit(self, serialNumber): # since the user should address this immediately, and we # shouldn't let this go as a soft error # but I think this should do for now - if m == 0x11A: + if m == 0x11A or m == 0x11E: self.changePowerSource(m) else: self.checkResult(m) From 5be00bc24c8b0bd8eca8eb26c5ef1d4ee6abee95 Mon Sep 17 00:00:00 2001 From: Mark Harfouche Date: Thu, 11 Apr 2024 10:04:00 -0400 Subject: [PATCH 2/2] Allow USB2.0 to be used with ps5000a --- picoscope/ps5000a.py | 1 + 1 file changed, 1 insertion(+) diff --git a/picoscope/ps5000a.py b/picoscope/ps5000a.py index 13e8c32..fc45b11 100644 --- a/picoscope/ps5000a.py +++ b/picoscope/ps5000a.py @@ -177,6 +177,7 @@ def _lowLevelOpenUnit(self, serialNumber): # since the user should address this immediately, and we # shouldn't let this go as a soft error # but I think this should do for now + # PICO_POWER_SUPPLY_NOT_CONNECTED or PICO_USB3_0_DEVICE_NON_USB3_0_PORT if m == 0x11A or m == 0x11E: self.changePowerSource(m) else: