PiDP-11: RECREATING THE PDP-11/70

Connectivity Options & Hacking About

 

You don't need to read any of this - if all you want is to use your PiDP-11 in the standard way. But because it uses a Raspberry Pi, there is the temptation to configure, customise and hack for extended fun.

In fact, given the general uselessness of a 45 year old computer, hardware hacking is exactly what could provide motivation to explore its inner guts. So the PiDP-11 circuit board contains a set of footprints for RS-232 level converters and even a breadboarding area to add features to the system. A few spare IO pins and line drivers are labeled on the PCB for that purpose, and the I2C port of the Pi can be hooked up too. Think of it, you could add any I2C IO chip to provide sensors, hook up more IO, add DA converters to do graphics on oscilloscope displays.

PiDP-11 circuit board (click to zoom): note the area for breadboarding (top left), the optional RS-232 level converters (top right) and a number of pins labeled for optional functions.

Power Options

You can use the standard micro-USB power cable to power the Raspberry Pi, but alternatively you can use the 5V and GND pins on the serial connector on the PiDP board.

 

The benefit is that you can then use the keyswitch on the front panel to power the PiDP-11 off and on. You can connect it to the KEYSWITCH_POWER header on the PCB. See the illustration under the next section for wiring.

There is, however, another possibility with that keyswitch, so you might want to use the regular micro-USB cable to power your Pi after all. Instead of crudely cutting the power, the keyswitch can be wired to act as a switch detected by software. Then, it sends the Pi a ‘sudo shutdown now’ message instead of crudely cutting power. For this option, you can connect the keyswitch to the SOFT_KEYSWITCH_OPTION header on the PCB.

PiDP-11 circuit board (click to zoom): enabling the soft_keyswitch option, and where to cut two traces if you also want to disable the same switch function from the Address Encoder (which would make sense).

PiDP-11 circuit board (click to zoom): 

(1) connecting a standard (Arduino-style) USB-serial cable with GND-RX-TX

(2) connecting an external power supply (5V and GND) and wiring up the keyswitch to be a hard power switch

Ethernet cables

There is a press-out for an Ethernet jack on the back panel, you could run a terminal from there too. Of course, you might as well connect over Wifi these days. To create a Linux terminal on these ports, you need to do some setup. Google for it on the Pi fora, for instance.

Terminal options:

 

For a terminal, the logical three choices are either to use the HDMI/USB keyboard, or use wireless ssh sessions over wifi, or to use the console serial port. Like on any Raspberry Pi. But you can also add up to 5 proper VT-220 terminals if you wish, read on.

USB-Serial cable to hook up a laptop as terminal:

The pinout of the PiDP-11’s serial port is that used by the 5V TTL USB-Serial cables that are popular for Arduinos etc, with an extra GND pin. 5V and one GND pin can be used for your power supply, and the TX, RX and other GND pin are for your USB-Serial cable. 

 

Do NOT use the 5V lead from a USB Serial cable at the same time as providing 5V over a Pi power supply. Also, the 5V pin of these cables is not good enough anyway to power your Pi 3. It would lead to data corruption on your SD card sooner or later.

These $5 USB-Serial cables can be hooked up directly, resulting in a USB connector to plug in to your laptop, and let that function as your terminal. 115200 baud, 8N1. 

There is an onboard voltage divider on the PiDP to deal with the fact that the Pi wants to see 3.3V RX signals, whilst these cables work on 5V levels.
If you want 3.3V serial TTL, that is possible too, by getting rid of the voltage divider circuit. Remove the 1K resistor from RX to GND, and optionally, replace the 2 1K resistors from the RX pin on the connector to the RX pin on the GPIO.

A real serial terminal (VT-220, VT-100, ADM-3A...)

Of course, you can add a TTL-to-RS-232 converter to the console port instead of a USB-Serial cable. This would allow you to use an authentic serial terminal. Many people would use the ubiquitous $5-or-so converters that are available everywhere (link). The converters have a DB-9 connector and can be mounted on the back panel of the PiDP-11. There is a press-out mount slot.

More elegant would be to use a MAX232 (or MAX202, or any of the pin-compatible substitutes) level conversion chip. The footprint for that chip and the 5 0.1uF capacitors it needs (check the MAX232 you use, the old ones use bigger caps) are at the top of the PiDP-11 board. Wire the serial port's RX and TX pins to the TTL level connector headers, and your RS-232 terminal to the RS-232 headers. Again, DB-9 or DB-25 connectors can be mounted on press-outs on the back panel.

Adding 4 Serial Ports

 

Clearly, a PDP-11/70 should have multiple terminals attached. The simple way is to open up ports over a Wifi connection. No hardware needed. But it might also be attractive to have 4 additional, proper RS-232 connectors on board. If you have 4 VT-100 terminals, for instance.

To this end, 4 of the above-mentioned $5 USB-Serial cables can be plugged in to the Pi's USB ports. Note that here, these cables are used the other way around: the USB end goes in to the Pi. The RX/TX/GND pins go into the TTL serial headers of the optional MAX-232 circuitry on the PiDP board. And the level-shifted RS-232 signals are then brought out on DB-9 or DB-25 connectors on the back panel.

What kind of terminal to add to the PiDP-11:

 

The hardware setup of multiple serial ports was described above. The software end presents you yet again with two options.

(1) you can add a second serial (well, USB-serial) console to the Pi’s Raspbian OS. See this (link) for the configuration steps to do this. You now have multiple Linux consoles.

Or (2) you explicitly do *not* do that. Then, the additional serial ports are available as free serial ports for simh (the pdp11 simulator), which is actually the better choice in most situations. You now have multiple serial ports usable in simh. If you follow option (1), there is a linux console listening on the extra serial port meaning that simh is blocked from assigning it as a serial console for the simulated PDP-11! See the simh documentation for how you configure such free ‘option 2’ serial ports for use in the PDP-11 simulation.

top: Making the standard serial console port RS-232 compliant on port #3; (2) Using a cheap USB-Serial cable and making it RS-232 compliant on port #1

Below: 4 USB-TTL serial cables (<$2 each!) brought to RS-232 voltage levels for 4 old VT-220 terminals. Now you can host 5 users in total...

5.00V or 5.35V Power Supplies?

 

On-board voltage drop for use with the Official Pi Power Supply

The Pi 3 is recommended for the PiDP-11, just because the extra speed is nice to have. You can use older Pi’s as well. It should be noted that the Pi 2 and Pi 3 are best used with the Official Pi Power Supply, which has the odd characteristic of providing 5.35V to deal with their "sensitive power needs". A normal 5.00V power supply might lead to SD card data corruption unless it is *very* stable.

There is another consequence. The 5.35V from the Official Pi Power Supply makes all LEDs on board glow faintly, even if they are off (the Pi Glow topic from the PiDP-8). To prevent this, the PiDP leads the power through a diode just to the left of the IC socket on the board. This drops the voltage by 0.6V, which results in a voltage the PiDP likes (no risk of damage with higher voltages though). Should you use a proper 5.00V power supply, you might want to short that diode with a bit of wire, you don’t want that 0.6V voltage drop with a 5.00 voltage. There is no risk of damage either way (with or without the diode shorted). Just brighter LEDs.

PiDP-11 circuit board (click to zoom): 

You could short this diode if you are NOT using the Official Pi Power Supply (or whatever 5.35V PS) but a real 5.00V one. It will make the LEDs burn a bit brighter. Not really a relevant modification but you never know who cares!

Adding Circuitry & the Prototyping Area

 

There are a few things to consider when you add circuits here. First, the power line of the prototyping area is the 5V line. Depending on what power options you have used, it is the 5V from the Raspberry Pi's microUSB power cable, or the 5V from the keyswitch and the serial/5V connector.

More importantly, it is not the 3.3V that the Pi likes. You can take the 3.3V from the I2C connector header next to the Pi's GPIO footprint. And you could lead it to the prototyping area's top line by making a trace cut to interrupt the 5V line. Either the entire line, or just a segment. 

Also important, the 5V presented here is taken straight from the power supply. Not the voltage that is first led through a diode into the 2981 IC, which causes the 0.6V voltage drop to eliminate Pi Glow (see section above).

Connections you might like to take from the PiDP into the prototyping area:

1- the I2C lines (right next to the Pi GPIO header)

2- the one free GPIO pin, GPIO 19, still left on the Pi (also right next to the GPIO header)

3- the two free lines on the 2981IC. Two inputs (3.3V or 5V, whatever you want); and two strong outputs (5V-0.6V, see Pi Glow) that can drive lots of mA if you wish. You will need to do small trace cuts to free the two input lines from their GND pulldown though.

Using (2), you could add up to 12 extra switches that would be detected by the pidp11 software, for instance, or whatever inputs you need in combination with the 12 COL signals on board. Using (3), you could add two rows of 12 additional LEDs, or whatever outputs you need, in combination with the same 12 COL signals.

The first hack arrived - add a thermometer and barometer to the PDP-11's unibus for $0.90 in hardware

Ready-made optional connectors for the back panel

 

The following pictures and links give you an idea for what ready-made internal connector/cable combinations can be bought if you want connectors on the back panel and do not like to solder your own cabling. Mind: normally, you just lead your existing Pi connector cables through the back panel and plug them straight into the Pi. These cables are optional, if you like to enhance the looks of the machine.

So this becomes a 'where to buy cheaply' section, I imagine, as builders start looking for parts. But, so far:

USB-to-TTL-Serial Cable. Used in 2 situations! From the PiDP serial console port straight into your laptop. And also, up to extra 4 pieces, from the Pi's 4 USB ports to the onboard RS-232 level converter for extra serial ports. Note these cost <$5 on Aliexpress, including shipping! But the link here is to Adafruit, trusted supplier :)

USB internal connector cables. One end goes into the Pi, the other can be screwed on to the back panel. (Adafruit link)

DB-9 or DB-25. Wire up to the RS-232 headers (#1-4) on the PCB, the DB connectors can be screwed on to the back panel with M3 bolts and spacers (or nuts). Can be found everywhere, Aliexpress for lowest cost.

Ethernet connector cable. From the Pi to the back panel... (Adafruit link)

Most used (5.5/2.1mm) DC power jack. Wired to the 5V and GND on the PiDP power/serial console connector. Can be found everywhere, Aliexpress for lowest cost.

 

MicroUSB connector cable. Fits the Official Pi Power Supply (well, any microUSB power supply). From the Pi to the back panel... (Adafruit link)

(201806 and later backpanels contain a cutout for this)

 

HDMI connector cable. From the Pi to the back panel... (Adafruit link)​

(201806 and later backpanels contain a cutout for this)

Update: these USB cables prove to be too deep to fit the case. Some have success by cutting the cable protector so the cable can make a steep turn. Others report it won't fit.

Please note that the cutout slots in the back panel are not guaranteed to fit your particular cable. I think the dimensions are standardised, but no guarantees! Contact me for exact dimensions if you wish, or be prepared to wield an Exacto knife in the worst case... (to your back panel, it's not hard to adjust cutout slots)

Using real PDP-11 disks & core memory?

 

Crazy but possible. If you have an old Unibus PDP-11 (any model) the UniBone project allows you to hook it up and take over its Unibus cards and any of its peripherals. This is very much work in progress, meaning you'll have to join in and code, but Angelo delivered a proof of concept where a simulated CPU on Linux used the physical core memory in a PDP-11 (with the real CPU unused), the Model 33 teletype and also ran four RL02 drives. Oh, but the drives were simulated Unibus devices again. Frankenstein stuff. Very strange things can be done with the Unibone.

7120711513027485198.jpg

Recommended:

Gigatron - the computer without a microprocessor!