Arduino HP-IB Adapter

 

The Arduino HP-IB Adapter is a device that implements the HP-IB protocol in software. The device consists of an Arduino Mega board, a prototype Shield and an Ethernet Shield for connection to the LAN. It offers the means to provide support for HP-IB even when dedicated controllers such as the TMS9914A are no longer available.

The main objective of this project is to make a peripheral that is compatible with existing HPIB devices, so it must respect bus loading specs, and must be able to back off when other devices are talking. It should also avoid hogging the bus (which in some respects it still does when it is sending diagnostic output to the serial port).

For this reason I used the standard bus driver chips (the SN75160A and SN75162B). I used the `162 because I did not understand how the HP-IB handshake worked and hence had a lot of trouble with the SN75161 (the difference is that the 161 is slave only, while the 162 can act as both slave and controller). After lots of head scratching and looking at Logical Analyser traces of the bus, I have finally figured out what I did wring, but this will have to wait for another video. In the mean time you can look at the code to see how it works.

The parallel poll support needs to be in hardware as the timing requirements are too tight for the Arduino, and in any case once you have soldered the two bus driver chips and the HPIB connector and wired them together, adding the 74LS02, transistor and resistor is not really an issue.

The low level HP-IB routines provide the basis for the implementation of various protocols. In this version of the Arduino HP-IB Adapter software we support the Amigo disk drive protocol and a rudimentary (send only) printer protocol.

 
Disc Drive Operation
Hardware Design Overview

2. Brief notes about the system

I have finished testing of the initial version of the software for an implementation of an HP-IB drive using the Arduino Mega system. Unlike previous systems, the Arduino HP-IB adapter is using a Unix/Linux host as a file server (which is why I call it an adapter, rather than a disk drive).

The first version of the software emulates an 9121 with 4 floppies.

Changing a jumper plus a constant in the software, allows the adapter to assume an HP-IB address from 0 to 7 (due to parallel poll restrictions).

The adapter also allows a serial printer to be connected to the HP-IB system (there is no flow control though, so it has to be a fast printer). The address of the printer is set via a software constant.

In the above video I demonstrate that the Arduino HP-IB adapter can coexist with other HP-IB peripherals (in my case a ThinkJet printer). Using PRINTALL I sent a virtual floppy directory listing to the printer, so the printer output is intermingled with the file I/O over the HP-IB bus.

2.1 Network-based fiel server

The Arduino uses the Ethernet shield to connect via the LAN to a server on a Linux/Unix host via TCP. The server supports up to 4 virtual floppies (the contents of each virtual floppy is stored as a separate Unix file). The server supports both standard LIF volumes and swap files (i.e. single LIF files with their LIF directory entry in the beginning).

A separate utility allows managing the virtual floppies, so that you can unmount a floppy from unit 0 and mount it on unit 1, swap floppies and so on).

By default floppies are mounted Read Only, but specifying the -w flag allows a volume to be mounted Read/Write.

2.2 Arduino Hardware

I am using an Arduino Mega (because its got lots of I/O pins), an Ethernet shield and a Mega prototype board where the HP-IB specific parts are placed. The wiring diagram of the prototype board shows the interconnects between the ICs and the arduino.

While the part count is small (3 ICs, a transistor, capacitors etc.) there are lots of wires, so making a PCB may be a good idea.

2.3 Arduino Software

I am fairly happy with the low-level HP-IB routines, but the Amigo implementation is a hack because I was essentially adding functions till everything worked. I am working on a better software release which will I will upload on github.

More information will be posted in this page as the project progresses.

2.4 Original code release

This is prerelease code. I am making it available for testing purposes and for use by early adopters. There are bugs and things will probaby change in future releases. So no documentation (other than a README file) and no support.

Alpha Code Release

Back to the home page.