Proposal: Emulate the AX08 PDP-8 series laboratory peripheral via a USB-connected Arduino
The base model AX08 has:
- four 9-bit ADC inputs with a conversion time of 17 µs over a ±1.024V range with 50 kΩ input impedance
- three Schmitt-triggered digital inputs with 0.7V of hysteresis
- an X-Y vector display output
This can be expanded:
- +4 analog inputs via Option XM
- +16 analog inputs via up to four Option XC modules, each of which adds 4 ADC inputs; requires Option XM
- a fourth Schmitt-triggered input, 8 straight digital inputs, 3 digital outputs, and an 8-level Z output for the vector scope to control intensity, all via Option XR
An Arduino Uno has:
- six 10-bit ADC inputs with a stock conversion time of 65 µs over a 0-5V range with 100 kΩ input impedance
- 14 digital inputs, all Schmitt-triggered, but only with 0.05V of hysteresis
- 6 PWM outputs
These differences may all be overcome.
The Arduino's conversion time may be reduced to approximately 20 µs without heroic measures. This impacts accuracy, but we were going to throw away the LSB anyway.
By default, the Arduino's ADC gives a single-ended result, but it we can mathematically adjust the result so that the 512 conversion output code (FS/2) maps to 0000 octal out.
The AX08's input voltage range of ±1.024V can be mapped into the Arduino's input range in one of two ways. Either we can set the analog input virtual ground to +1.024V relative to the Arduino system ground and use an op-amp to gain the input signal up by approximately 2.5× to put map that range to 0-5V, or we can set the Arduino analog reference to 2.048V. The latter pushes the input signal down into the noise floor a bit, but is easier to implement. A programmable reference voltage is one IC and a few resistors, whereas the op-amp circuit probably requires two op-amps, one of which includes the negative supply pin in its input range.
We may want to go with the op-amp solution anyway since the reference voltage option means we get the Arduino's input impedance, which appears to be 100 kΩ, whereas the AX08 had a 50 kΩ input impedance. If that matters, we'll need a buffering layer to separate the two impedances.
The Arduino digital inputs are inherently Schmitt-triggered, but the input and hysteresis levels are all different. A custom Arduino shield could add external 0.7V Schmitt trigger ICs with suitable input ranges. Or, the user could simply decide that all they care about is the 0/1 result value, and will use the Arduino's given input characteristics. Either way, we have enough I/O even on an Uno to emulate the base unit's digital I/O, plus most of Option XR.
Moving up to an Arduino Mega lets us cover the entirety of Option XR plus Option XM and two Option XC modules.
The vector scope driver can be implemented by using the Arduino's PWM outputs as low-frequency DACs, with some signal conditioning. Or, if better speed is required in order to get suitable display update rates, we could add a real DAC chip via a custom shield. This will take several of the digital output pins for I²C or SPI.
As for "why USB", because it's easy, and the PDP to AX08 interface doesn't seem important to emulate. Oscar Vermuelen proposed that we use the PiDP-8/I's expansion connector, but that just complicates things, requiring many I/O input into the Arduino plus mapping input line changes to AX08 commands. The same commands could be sent over the USB-to-serial interface of the Arduino just as easily.
The SimH to Arduino link can be as simple as a symlink from
/dev/ttyACM0 or similar. The AX08 communicates with the PDP via standard IOT instructions, so the simulator just needs to know that when it sees the relevant sub-instructions that it should send suitable commands down the
Copyright © 2017 by Warren Young. This document is licensed under the terms of the SIMH license.