Products > Test Equipment
open source GPIB adapter
maxwell3e10:
Could you post your version of the code for Arduino Pro Micro? I'd like to try it, without having to make a custom PCB.
caiser01:
--- Quote from: artag on September 13, 2023, 05:11:13 pm ---The initial question in this thread was to find an adapter which can be accessed through the Visa API. The AR488 doesn't do that - it emulates the Prologix USB adapter, which communicates over a serial-over-USB emulation.
I guess it's possible to write a Visa interface for Prologix but I don't know that anyone's done that. Or modify the python interface to use Prologix instead of Visa, but then you end up with a Python API which is another ratsnest of incompatibility.
--- End quote ---
I use my AR488 adapters with pyvisa exclusively and they work great. Here's an example for reading DC voltage from an HP 34401A:
--- Code: ---import pyvisa
from sys import platform
rm = pyvisa.ResourceManager('@py')
if platform == "linux" or platform == "linux2":
# Linux
multimeter = rm.open_resource('ASRL/dev/ttyUSB0::INSTR')
elif platform == "darwin":
# macOS
multimeter = rm.open_resource('ASRL/dev/cu.usbmodem101::INSTR')
elif platform == "win32":
# Windows, COMx = ASRLx
multimeter = rm.open_resource('ASRL19::INSTR')
multimeter.write('++rst')
multimeter.close()
sleep(2)
multimeter.open()
multimeter.baud_rate = 115200
multimeter.timeout = 5000
multimeter.write_termination = '\n'
multimeter.read_termination = '\n'
multimeter.write('++addr 22')
multimeter.write('++auto 2')
multimeter.write('++eos 2')
multimeter.write('++eoi 1')
multimeter.write('*RST')
multimeter.write('*CLS')
print(multimeter.query('*IDN?'))
multimeter.write('CONF:VOLT:DC 10,0.001')
try:
while(True):
print(multimeter.query('READ?'))
except KeyboardInterrupt:
multimeter.write('*RST')
multimeter.write('*CLS')
multimeter.write('++loc')
multimeter.close()
rm.close()
--- End code ---
--- Quote from: artag on September 13, 2023, 05:11:13 pm ---It's also possible, with some reassignment of pins, to make the xyphro software work with AR488 hardware. However, the xyphro software makes better use of the Atmega's pins : some are not available on the Arduino boards which results in inefficiences such as having to bit-address some ports instead of byte-address. IIRC I laid out the Arduino Pro Micro pcb to work as well as possible (eg write the 8 bit data port in only two writes) but the original xyphro assignment is better.
--- End quote ---
I'm wondering if the opposite is true, i.e. that you can use AR488 software with the xyphro hardware by changing up the pin assignments. I've been playing around with xyphro adapters and I like the form factor. I'd be interested in trying to get the AR488 firmware running on the xyphro adapter...
coromonadalix:
you have to remap some pins ...
caiser01:
Looking at the schematics for the xyphro vs the Arduino Pro Micro, I think it is possible to run AR488 on the xyphro adapter but I think it requires a custom Arduino board definition. Two of the pins the xyphro uses as data lines are used as the RX and TX LEDs on the Pro Micro, so I think you'd need an Arduino board definition that remapped those to other pins to be able to flash AR488 on the xyphro hardware.
I might give it a shot if I have enough time to kill one day...
dazz1:
I have assembled one USB-GPIB adapter and I am now trying to load the firmware.
I have an Aliexpress usbasp programmer. I am running avrdude on Ubuntu.
I have successfully run the following commands:
--- Code: ---avrdude -P usb -c usbasp -p m32u4 -e -Uefuse:w:0xcb:m
avrdude -P usb -c usbasp -p m32u4 -e -Uhfuse:w:0xd8:m -Ulfuse:w:0xff:m
avrdude -P usb -c usbasp -p m32u4 -U flash:w:BootLoader.hex
--- End code ---
avrdude -P usb -c usbasp -p m32u4 -e -U flash: "FLASH.BIN" -vvvv
These commands are based on instructions earlier in this thread and they return messages of success.
For the benefit of others:
-P the port
-c programmer type
-p MCU type
-e erase first. Necessary before programming.
see
--- Code: ---/etc/avrdude.conf
--- End code ---
and
--- Code: ---man avrdude
--- End code ---
or/and
https://www.nongnu.org/avrdude/user-manual/avrdude_3.html#Option-Descriptions
for full details.
I am now stuck on what to do next. I understand this is a copy command, but I can't figure out what my destination should be. I was expecting another avrdude command at this point.
--- Code: --- cp TestAndMeasurement.bin /run/media/baettig/GPIBUSBBOOT/FLASH.BIN
--- End code ---
# verify with md5sum, umount, unplug
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version