Difference between revisions of "AR488"

From sigrok
Jump to navigation Jump to search
(hardware, list components, nits)
(protocol, more examples, more readable markup)
Line 14: Line 14:
== Protocol ==
== Protocol ==


The AR488 firmware passes the PC's transmit data to GPIB, and GPIB data to the PC.  Commands start with the ++ prefix.  Macros (both executed at runtime as well as at firmware start) are supported.
See the AR488-manual.pdf document for a protocol description.  The AR488 firmware passes the PC's transmit data to GPIB, and GPIB data to the PC.  Commands start with the ++ prefix.  Macros (both executed at runtime as well as at firmware start) are supported.


Use with sigrok:
How to use the AR488 adapter:
* Create a startup macro (built into the AR488 firmware, compile time option), specify "++addr N" and "++auto 1" and optionally "++read" (adjust the device address).
* Modify the firmware to enable the macro feature and especially the startup macro (remove comment leaders from disabled defines).
* Specify SCPI over serial like so:  sigrok-cli -d scpi-dmm:conn=/dev/ttyUSB0:serialcomm=115200/8n1 --scan
 
  #define MACROS
  #define STARTUP
 
* Locate the startup_macro[] definition and adjust it to match your use case.  Here is an example.
 
  ++addr 20
  ++auto 1
  ++read
 
* Compile and upload the firmware into the adapter.
 
* Open a terminal program and run a few commands.
 
  $ screen -t CON-gpib /dev/ttyUSB0 115200
  *idn?
  conf?
  read?
 
* Use the adapter with GPIB aware applications, like sigrok's SCPI over serial.
 
  $ sigrok-cli -d scpi-dmm:conn=/dev/ttyUSB0:serialcomm=115200/8n1 --scan


== Resources ==
== Resources ==

Revision as of 07:47, 8 September 2019

AR488 GPIB to UART/USB

The AR488 is an Arduino based GPIB to serial port adaptor. The firmware runs on UNO (and thus Nano) as well as Mega boards. The PC sees a USB or RS232 attached COM port, transmit data is sent to the device, the device's response is seen as receive data. Out of band commands prefixed by ++ can control the adaptor's behaviour. The AR488 is accessible to interactive sessions in a terminal program, as well as can serve as a SCPI over serial "cable".

Hardware

  • Arduino Uno or Nano (ATmega328p based) or Mega (ATmega2560)
  • Centronics 24pin connector

See the AR488-manual.pdf for schematics. Wires run from the Arduino board to the Centronics connector, no driver chips are involved. This keeps the component count low, the wiring simple, and the mechanical construction compact (especially with Nano boards which can execute the Uno firmware). In theory any bare serially attached ATmega chip would do, but the firmware happens to be written in the Arduino IDE's language (uses libraries and build support, won't work outside of the IDE without modifications).

The primary goal of the project is to enable quick access to GPIB attached devices. Typical use is to have one adapter per device (it's rather low cost, so that's not an issue). The lack of proper drivers means that the adapter cannot handle a full bus, the limit is said to be somewhere around three or four devices, before signals go out of spec and communication need not work reliably any longer. For larger setups with many devices a proper full-blown adapter with appropriate driving capabilities is recommended.

Protocol

See the AR488-manual.pdf document for a protocol description. The AR488 firmware passes the PC's transmit data to GPIB, and GPIB data to the PC. Commands start with the ++ prefix. Macros (both executed at runtime as well as at firmware start) are supported.

How to use the AR488 adapter:

  • Modify the firmware to enable the macro feature and especially the startup macro (remove comment leaders from disabled defines).
 #define MACROS
 #define STARTUP
  • Locate the startup_macro[] definition and adjust it to match your use case. Here is an example.
 ++addr 20
 ++auto 1
 ++read
  • Compile and upload the firmware into the adapter.
  • Open a terminal program and run a few commands.
 $ screen -t CON-gpib /dev/ttyUSB0 115200
 *idn?
 conf?
 read?
  • Use the adapter with GPIB aware applications, like sigrok's SCPI over serial.
 $ sigrok-cli -d scpi-dmm:conn=/dev/ttyUSB0:serialcomm=115200/8n1 --scan

Resources