Monday, June 25, 2018

Worked out ASR33 modification, USB to TTY module working fine

ASR 33 TELETYPE RELAY BOARD UNDERSTOOD AND MODIFICATION DESIGNED

I learned more about that mystery board with the reed relay inside my ASR 33, thanks to some clues from William Degnan. This is a Reader Run Relay, a modification that was made to many ASR 33 units that were hooked to DEC minicomputers. 

The purpose is to advance the paper tape reader under control of the relay, since the DEC interface boards were unbuffered and could easily be overrun if a new character arrived before the last one was retrieved by software. 

If you remember from my last post, I determined that this board would short the Local and Line power  wires together when activated when the relay coil is driven by wires going to pins 5 and 6 of the the DB25 cable. Yes, as I said, that would force the unit online even if it were set to Local mode, but more importantly, it powers the Local wire when in Line mode if the relay activates.

The board had a wire from Local power out to pin 7 of J4, inserted as a modification. I didn't have the paper tape reader side to determine where that power from pin 7 went in the reader, thus I didn't suspect the reason. It appears that these third party boards, of which I found at least two other instantiations besides my own, provide power for the reader motor, under computer control. 

The reed relay in the board is going to respond to RS232 voltage levels, i.e. 12V approximately. If it isn't activated, the tape reader will not function in Line mode, but will run fine when the knob is in Local mode. If not used with a computer driving the relay wires, it won't work properly, but if hooked to a system that suffers from overrun without this feature, it won't work properly WITHOUT the board. 

I don't have a specific plan for a system to connect this to, other than perhaps my HP 1000F minicomputer. Still, I want to preserve full flexibility for the unit, so I won't just strip out the board and undo the modification to the tape reader. 

The solution is to install a jumper that is used or removed by the new owner to enable or disable the reader run board. The jumper shorts the contacts of the reed relay on the board, thus it is always powering the tape reader motor when the machine is in either Local or Line mode. 

This achieves my goal of having an ASR 33 that can be used flexibly, either with a DEC or similar computer that must start/stop the tape reader programmatically, or with a system such as an Altair that properly handles the full speed stream from the tape reader. It makes my ASR 33 valuable to both potential classes of user. 

USB TO TELETYPE INTERFACE TESTING

I plugged in the full size USB CP2102 board I bought and wired the TX line to my scope to watch what comes down the line from Heavy Metal when sending teletype characters. It confirmed the problem I was having - the open to the COM 7 port is not successful.

I suspect the problem is in the mapping of baud rates. The CP2102 is programmed to associate 600 baud requests with 45 baud operation. Therefore one has to open the COM port for 600 baud, 5 bit, 2 stop, no parity in order to communicate. The Heavy Metal program has no option for 600 baud, but does have a 45 baud one. I suspect that it is opening requesting 45, which the CP2101 rejects. There is no choice for 600 baud in Heavy Metal.

I tried Putty, a common terminal emulator program, but it hated 5-N-2 operation and gave up immediately. I will have to sort out this configuration challenge before I move on to the board itself. I tried to whip up a Python program to open the COM port at 600 5-N-2 and loop sending alternating R and Y characters.

After initial errors, I discovered that the lying driver claims it supports 2 stop bits but fails on open unless I set it to 1 or 1.5. With COM 7 configured as 600 5-N-1.5 I opened successfully and verified the proper bits arriving on the TX pin of the UART board.

I think I will begin configuring these as 600 5-M-1 which sends a MARK as the parity bit followed by MARK as the stop bit - in other words, a two cell long stop bit of MARK. This avoids the brain dead Windows behavior.

The problem remains how to get HeavyMetal to open this successfully. I set up the default on the COM 7 port to be 600 5-N-1.5 but again, with no menu choice for 600 baud, I have to select 45 baud from the tool and that makes the open call barf. Next up, how to hack HeavyMetal to add the 600 choice, or perhaps I modify the USB module to use some known rate instead of 600.

I did some searching on the web and found the developer site for HeavyMetal. I run the latest, 3.1.003. He identifies the need to support 600 baud for this USB interface project, but 3.1.004 is in development, not released. S**t.

Now to try to find the other program that is claimed to work properly, BaudotRSS, and see if that will work.To run BaudotRSS I have to configure my Python 2 system with a number of packages before I can run.  Once I am ready to configure all the packages for BaudotRSS, it will give me many more feeds that can be autodirected to the teletype.

It was easier to just hook up the project to my Python program which was repeatedly sending RYRYRYRY at 45 baud. That gave me a fast way of testing the behavior of the project.

Excellent news! The TX lamp on the USB module flashed. The data light on the board flashed. The test points showed 120V developed on the capacitors. My scope showed the proper pattern for the R and Y characters I was sending. Everything appeared happy.

All that is left is to set up a short and measure the current during a MARK condition With no data it should be permanently in the MARK condition. That is the normal idle condition of a teletype line.

I hooked up my VOM to measure the 60ma current that should be delivered, and bridged the output pins of the phone jack. With everything hooked up, I flipped on the switch for the interface. Just about exactly 60ma measured with the output shorted, right on the money.

This is as tested as I can get it without an actual teletype selector magnet and mechanism, e.g. a printer or typing reperforator. Hopefully we can fire this up in a week or two, once we have a working teleype printer from among our two model 15 and one model 19 (actually still a 15).

I am installing it in the project box specified by the designer. I have to measure and cut some holes for the various jacks, switches and LEDs but otherwise it is ready to go.

I did the install for the BaudotRSS program components and tested with this as well. It does seem capable of handling the 45 baud 5-N-2 configuration and may be the program I end up using for our testing and demonstrations. 

No comments:

Post a Comment