IN3LBQ on the Hühnerspiel (Amthorspitze) - photo by IN3OTD

HP disk on SD card emulator

I have built the HPDisk, an HP disk drive on SD card emulator designed by Anders Gustafsson
The schematic is practically identical to the original design:

I have designed my own PCB since I wanted it to be somewhat smaller than the Anders'version

The PCB size was constrained to be 5 cm x 5 cm, to fit in the smaller price range of the cheap PCB building services available - this is why the holes for the GPIB connector did not completely fit.

Here is the BOM I used to build the prototype above, with the Mouser part numbers for the various components; it should be possible to load the whole BOM directly from the .csv file on the Mouser website using the "BOM import" page there.

Schematic corrections

The BOM above already includes the correct components values.

Build notes

The SD card SPI clock frequency is 2 MHz; the clock waveform seems fine but the data on the micro SD side are quite "rounded". The BSS138 level shifter is just fast enough with the current speed and a different circuit will be needed at higher speeds.
Anyway, with the default settings the transfer rate seems not too bad; saving the instrument state on an HP 8753C VNA needs just a few seconds.

The SD-card emulator uses the GPIB address 0, which should be the default for the old HP machines.
I have noticed that often when I first connect the disk emulator to the GPIB bus and then power it up, it does not work properly. I usually first power up the disk emulator and only after I connect it to the instrument.
The PIC outputs drive strength is not high enough to be fully compliant with the GPIB requirements. In theory one should use the special GPIB buffers for ensuring isolation when powered down and driving the bus but in practice the circuit above works fine if you have only a few other isntruments connected to the GPIB. If too many instruments are connected on the bus, the HP disk emulator will not respons properly anymore and may cause errors on the bus. At least during the initial test, connect the GPIB disk emulator directly to a single instrument.


The card debug UART is configured as 38400N1; at power up it will output some messages like this:

HPDisk v 0.16
Feb 24 2014 19:18:53
Hardware PP

Mount returns 0

SD_mount returns 0
Reading config
Open /hpdisk.cfg returns 0
Read 18 bytes
P:1 D:1
SS/80 9134L

Open /lifdata.bin returns 0
Max Vector 14893056 (E34000)

Interface clear
Open /lifdata.bin returns 0
Max Vector 14893056 (E34000)

No messages are printed during the files transfers, unless the FW is recompiled with the debug messages enabled. This option may be helpful to find any issue with the board, but in practice I did not need that as everything worked fine since the beginning.

The numerical codes after "returns" in the messages above are related to the SD card access: the possible codes are:

0OK (no errors)


Since the device schematic is almost identical to the original one, you can directly use the firmware prepared by Anders. The FW must use the HW parallel poll mode; I currently use fattest_16_hwpp_d.hex found in the file found on his web page. Any more recent version should also work but I did not try newer ones, since the version I'm using works fine for my needs.

The programmer I used was a good ol' JDM-like, more or less like this from Olimex (its schematic is here). The pin numbering of the board ICSP connector matches the programmer pinout (pin 1 goes to /MCLR,VPP).
The SW I used to load the FW was WinPic800 v3.64H under Windows XP; once the board is connected to the programmer you can check with a Ctrl-D that the device is correctly detected; normally the programmer LED is off, but when doing a Ctrl-D it blinks a few times and then the device model is correctly shown.

Preparing the SD card

The SD card to be used with the GPIB disk emulator needs to be properly prepared, as explained on the Anders' website: in practice these two files are needed: