Sunday, July 15, 2018

Modified SBC 6120 to work correctly with ASR 33 teletype, as well as tested Altairduino to TTY link


My replacement MAX3232 board arrived and I wired it up to allow me to connect it to either the Cypress 2102 based USB to serial module or the Altairduino serial port, This board features a male DB9 on the end, for connection to my cable, Telebyte and teletype. Fortunately, both the USB to serial module and the Altairduino will be properly configured for 110 baud with the proper character size and stop bit values. 

I constructed a cable from DB9 to DB25 to carry the true RS232 signals to the Telebyte 65 converter which drives 20ma current loops to and from the ASR 33. All I have to do is plug in a male DB9 to this cable and it will drive the teletype correctly when set to 110 baud, 7 bit, even parity and 2 stop bits.

The SBC 6120 computer has a male DB9 and is transmitting at 111.6 baud, but not yet with the proper configuration e.g. it currently emits 1 stop bit. I plan to modify the machine to work properly.

I discovered that this PDP 8 clone computer uses the Harris HD6402 UART chip which allows for selection of the serial format including stop bits. That means I can adjust the chip by bending out some pins and tacking them to +5 or ground to set up the configuration of the console serial port.

I first experimented with the USB to serial module to see the effect of various choices in serial port configuration, to determine what control bit setting to attain with the Harris UART. Next up, I modified the computer to operate with those settings, then gave it a try with the teletype.

The UART does not support MARK parity, which means that I need to use an data=7 to substitute the last bit for parity and then select parity=EVEN to lead me directly into stop=2. The teletype will see a start bit, 7 character bits, even parity and 2 stop bits.

That last character should always be MARK but I can't insure that. Since the teletype is not a smart device, it should not react to the incorrect parity bit. I used the USB to serial configured as 300-7-E-2 but the modification to the Cypress 2102 chip on the module causes it to actually run as 110-7-E-2 which is what I wanted.

I was able to send long strings of text, faster than the teletype can print, which showed up perfectly. The input from the ASR 33 keyboard shows up faithfully on the PUTTY screen. That tells me that this setting should work fine for the SBC 6120 as well.

I hooked up my new MAX2232 to the Altairduino and plugged the MAX into the connector for my teletype. Everything worked great. I put the computer into configuration mode, which prints a long menu of options, and it all came out flawlessly.

Altairduino configuration menu
The only problem I had is an inherent problem of the Altairduino code - the command for setting the serial port is 's' and the command to save a configuration is 'S'. Since ASR 33 only produces upper case letters, my keystroke asked to save a configuration when I had hoped to list out the serial port parameters.

The Altairduino is configured as 110-7-E-2 and works fine with the teletype. The reason that I had garbage typed but correct response with the unmodified SBC 6120 chip was that an incoming character of 7-M-2 simply appears to be a 8-N-1 character or a 7-N-1 with an idle interval before the next start bit.

The incoming characters to the printer are sent 8-N-1 and that means the next start bit arrives while the Teletype is still expecting a second stop bit. This gets the bit stream out of sync and causes garbage to type interspersed with some strings that accidentally line up properly.

The Harris 6204 UART chip has five pins that configure the serial port - CLS1, CLS2, PI, EPE and SBS. The normal mode for the SBC6120 sets these to request 1 start bit, 8 data bits, no parity and 1 stop bit. To work with my teletype, I need to have it set to 1 start bit, 7 data bits, even parity and 2 stop bits.
Harris UART chip at bottom
The only signals that switch value between normal and ASR 33 settings as CLS1 (pin 38), PI (pin 35) and SBS (pin 36). The PCB has CLS1 and PI wired to VCC and SBS wired to ground. To change this around, I need to bend those three pins outward so they don't fit into the socket, then tack on wires allowing me to connect them differently.

Pins 35, 36 and 38 bent outwards to isolate them from PCB
I can do a quick and dirty, wiring CLS1 and PI to ground, SBS to VCC, which permanently sets the SBC6120 to teletype mode. However, without too much extra work, I can add a miniature DPDT switch. This will allow me to switch between normal and teletype mode at the flick of a switch.

CLS1 and PI signals on blue wire, SBS signal on white wire
I popped the chip, bent the pins, tacked on the wires and soldered together the DPDT switch this evening. I put the switch into the 'teletype' mode and stuck the unit back into its case. It was late but I went out to perform the final test that night (the ASR 33 is in my car trunk and I test with an outdoor table behind the car).

Everything worked great! The SBC 6120 booted OS/8 and I did a directory listing. The paper ripped a bit and messed up the line feed in a couple of places but the ASR 33 is working great. 

PDP 8 clone running OS/8 doing directory listing on ASR 33
The model 33 related hardware for the VCF West exhibition is set now. I will script out a few demos for both the Altair clone and PDP 8 clone, including paper tape input. I still need to test whether the teletype reader will overrun either of the clones; if they do, I won't be able to run an all out paper tape demonstration. 

No comments:

Post a Comment