Maybe, but the fact that your LED never blinks whenever the bootloader is in flash makes me suspect at least part of your problem lies elsewhere. I'm suspicious you have a short or a bad solder connection on at least one of the AVR pins. In particular, I'm wondering if you could have a short or intermittent connection to ground from pin 10 of the AVR since the bootloader is invoked by grounding that pin.
For QFN parts, I've had good luck clearing solder issues by heating the chip until the solder reflows, then giving the chip a few gentle but firm taps right in the center with handle of my tweezers.
Isn't USB C polarised ?
Rhode Schwartz visa package is small and efficient, you have rs tools in it to send and read commands ...
Finally, if you're familiar with Python, here is a simple script that can be used to read from the HP 3478A you mentioned in your earlier post. Please note: Your VISA resource string will be different because your adapter will have a different serial number to mine.Code: [Select]# HP 3478A Multimeter simple read test
import pyvisa
rm = pyvisa.ResourceManager()
multimeter = rm.open_resource('USB0::0x03EB::0x2065::GPIB_23_3423331363435161F191::INSTR')
# Set function to DC volts
multimeter.write('F1')
try:
while True:
print(float(multimeter.read().strip()))
except KeyboardInterrupt:
multimeter.clear()
multimeter.close()
rm.close()
Hi
where do I find the VISA resource string ?
There's a couple ways to find it. Since you say you haven't used Python before, let's stick to R&S VISA for a start to keep things simple.
...
('USB0::0x03EB::0x2065::GPIB_02_24238323232351C01171::INSTR', 'ASRL1::INSTR')
^^
It appears to be a constant that is unique to each adapter except for the GPIB instrument address. In this case "02" marked with ^^.It appears that the resource string is unique to each adapter (I have only assembled one so far). If so, then the string should be physically readable on the adapter.
I haven't design the enclosure yet, but it would be easy to include a slot for a light card label with the printed resource string.
It seems sensible to make the label big enough to include space for the ID of the test equipment that the associated software is written for.
# HP 3478A Multimeter simple read test
import pyvisa
print("Simple GPIB test for HP3478A multimeter")
print("Show the list of Resources")
rm = pyvisa.ResourceManager()
print(rm.list_resources())
# ID string for adapter 0: 'USB0::0x03EB::0x2065::GPIB_23_24238323232351C01171::INSTR'
print("Opening the Meter")
# Resource = GPIB-usb adapter 0. Different for each adapter.
multimeter = rm.open_resource('USB0::0x03EB::0x2065::GPIB_23_24238323232351C01171::INSTR')
# Write some text to display
multimeter.write('D2OK GPIB USB')
# Set function to DC volts (F1), auto-range (RA), trigger hold (T4), 4.5 digit (N4), auto-zero (Z1), internal trigger (T1)
multimeter.write('H1T1')
print("Reading the DC volts")
try:
while True:
print(float(multimeter.read().strip()))
except KeyboardInterrupt:
multimeter.clear()
multimeter.close()
rm.close()
>python gpib_test.py
Simple GPIB test for HP3478A multimeter
Show the list of Resources
('USB0::0x03EB::0x2065::GPIB_23_24238323232351C01171::INSTR', 'ASRL1::INSTR')
Opening the Meter
Traceback (most recent call last):
File "D:\gpib_test.py", line 19, in <module>
multimeter.write('H1T1')
...
R&S Tester does not find the usb-gpib adapter resource. I am not sure if installing NI-visa or py-visa has over-written something that R&S needs.
...
What is the output when you run pyvisa-info from the command prompt?
Machine Details:
Platform ID: Windows-10-10.0.19045-SP0
Processor: Intel64 Family 6 Model 94 Stepping 3, GenuineIntel Python:
Implementation: CPython
Executable: G:\Programs\Python310\python.exe
Version: 3.12.1
Compiler: MSC v.1937 64 bit (AMD64)
Architecture: AMD64
Build: Dec 7 2023 22:03:25 (#tags/v3.12.1:2305ca5)
Unicode: UCS4
PyVISA Version: 1.14.1 Backends:
ivi:
Version: 1.14.1 (bundled with PyVISA)
#1: C:\WINDOWS\system32\visa32.dll:
found by: auto
architecture:
('x86', 64)
Vendor: Rohde & Schwarz GmbH
Impl. Version: 7340546
Spec. Version: 7340544
#2: C:\WINDOWS\system32\visa64.dll:
found by: auto
architecture:
('x86', 64)
Vendor: Rohde & Schwarz GmbH
Impl. Version: 7340546
Spec. Version: 7340544
I can see it is grabbing the R&S visa (I have NI visa installed as well) but when I run R&S directly, it does not detect the usb-gpib adapter.
multimeter.write_termination = '\n'
Just for giggles, try adding this line after the open_resource line:Code: [Select]multimeter.write_termination = '\n'
>python gpib_test_HP3478A.py
Simple GPIB test for HP3478A multimeter
Show the list of Resources
('USB0::0x03EB::0x2065::GPIB_23_24238323232351C01171::INSTR', 'ASRL1::INSTR')
Opening the Meter
Reading the DC volts
-1.6431
-1.6427
-1.6425
...
So that confirms the adapter is 100% working.
Just had a look at xyphro's GitHub and it sounds as if he's been busy optimizing the firmware. Should be a nice update when he does his next release.
So that confirms the adapter is 100% working.Took a while to get here but that's great!
I would like to get my little old Linux Asus eeePC running pyvisa. What do you suggest, and in what order should I install? NI, R&S ?