Serial port settings for a real Teletype

General discussions related to the Altair 8800 Clone
mail@gabrielegan.com
Posts: 104
Joined: October 11th, 2014, 8:12 am
Contact:

Serial port settings for a real Teletype

Post by mail@gabrielegan.com »

I finally got my hands on a real Teletype and am trying to connect it the Altair clone. I know that there's some communication between the two as whenever I raise the STOP+AUX switches to enter the configuration menu on the Altair the Teletype does some chattering but it doesn't print the configuration menu. The Teletype has an powered (active) current-loop/RS-232 converter that can be set to DCE or DTE. I've got it set to DTE and am using one of the supplied serial cables that came with the Altair. If I switch to DCE and use a null-modem cable I also get the same chattering when I enter the configuration menu. If I use DTE and a null-modem cable or DCE and a straight-thru cable there is not even that limited communication.

I've got the Altair set Port 1 being a 2SIO port with RTS and CTS always asserted and the baud rate of 110 and I've tried 8N1 and 8N2 word sizes. Anybody know of any other settings I need to have to make the Teletype be the configuration terminal?

Gabriel Egan
toml_12953
Posts: 305
Joined: June 7th, 2013, 12:54 pm
Contact:

Re: Serial port settings for a real Teletype

Post by toml_12953 »

The TTY is 7 bits Even parity 2 stop bits. My TTY 33 works great with the Altair.
AltairClone
Site Admin
Posts: 661
Joined: April 5th, 2013, 10:55 am
Contact:

Re: Serial port settings for a real Teletype

Post by AltairClone »

The configuration menu ALWAYS runs at 9600 baud 8N1, so you'll never see the configuration menu on your Teletype.

The Altair DB-25 is wired as DCE, so we want the Teletype to look like DTE. Your observations from your cable experiments are consistent with this.

Setting port 1 to 2SIO with RTS and CTS always asserted and 110 baud is fine. You can't set word size, stop bits, parity, etc., for the 2SIO since that is under Altair software control with the 6850 UART, so I'm not sure what you're referring to with regard to 8N1 or 8N2 settings, unless you've also tried port 1 as an SIO.

You can toggle in a simple echo program to test the Teletype. The SIO version is actually a bit shorter if you want to set port 1 to SIO instead of 2SIO, set the baud rate for port 1 to 110 and set the word/parity to 8N2.

Here's the SIO echo program from the support page. You can toggle in the hex bytes shown starting at location zero:

Code: Select all

                 ; SIO (not 2SIO) echo test
                
 0000           	org	0
 0000 DB00      loop	in	00h		;wait for character
 0002 0F        	rrc
 0003 DA0000    	jc	loop		;nothing yet (negative logic)
 0006 DB01      	in	01h		;read the character
 0008 D301      	out	01h		;echo it
 000A C30000    	jmp	loop
AltairClone
Site Admin
Posts: 661
Joined: April 5th, 2013, 10:55 am
Contact:

Re: Serial port settings for a real Teletype

Post by AltairClone »

Here's another way to test the Teletype that may be easier and is much more flexible. Use the program SERBUF running under CP/M. If you've downloaded the support package, SERBUF is in the CPM2.2\Programs directory. You can also download it from the support page under http://altairclone.com/downloads/cpm/CP ... /programs/

Configure the serial ports on the Altair as follows:

Set port 1 to 2SIO at 9600 baud, CTS & RTS always asserted (i.e., "normal" setting for a terminal).
Set port 2 to 2SIO at 110 baud, CTS & RTS always asserted (this will connect to the Teletype).

Use a terminal emulator on the PC as the console port on port 1. Boot CP/M. Use "PCGET SERBUF.COM" to upload the program SERBUF.COM from your PC. Run the program like this:

A>SERBUF 2

Everything you type on the console keyboard (your terminal emulator) is sent to 2SIO port b (i.e., the Teletype). Everything you type on the Teletype is sent to the terminal emulator and should display on the screen. Note there is no local echo - what you type at each end only shows up at the "other" end.

This is the same program I used in the YouTube video https://www.youtube.com/watch?v=ED60ouPWkpg.

Take a look at the readme.txt file in the same directory as SERBUF, or in the SERBUF.ASM file for more information. You can send an entire text file, for example, to exercise your Teletype printer.

Mike
mail@gabrielegan.com
Posts: 104
Joined: October 11th, 2014, 8:12 am
Contact:

Re: Serial port settings for a real Teletype

Post by mail@gabrielegan.com »

Success! Once I stopped trying to get the Teletype to print the configuration menu and simply booted 8K BASIC instead, all worked fine. My only problem now is the way I'm providing it with 110v @ 60Hz. (British electricity comes at 50Hz and since the Teletype is mechanical I'm guessing it times its 110 baud off the mains frequency, so the difference between 60Hz and 50Hz matters.) I'm running a big 12v boat battery through a US-sourced inverter that turns 12v DC into 110v @ 60Hz. Trouble is, this setup runs for only 4 hours before depleting the battery. Any suggestions for a smarter setup much appreciated. (Running the inverter from a bench power supply rated at 13.5v DC at 40amps results in the inverter complaining that there's not enough power coming in.)

Regards

Gabriel
AltairClone
Site Admin
Posts: 661
Joined: April 5th, 2013, 10:55 am
Contact:

Re: Serial port settings for a real Teletype

Post by AltairClone »

Best bet would be a 50hz motor and gear change. A 240v/120v transformer is used in the base as the motor and teletype still operate at 120v.

Mike
kwiebe
Posts: 52
Joined: February 9th, 2019, 12:11 pm
Contact:

Re: Serial port settings for a real Teletype

Post by kwiebe »

This is a great thread for me since I plan to connect a TTY to my clone soon. But for the TTY-clone cable, can one of you tell me the type of cable that works?
-Ken
mail@gabrielegan.com
Posts: 104
Joined: October 11th, 2014, 8:12 am
Contact:

Re: Serial port settings for a real Teletype

Post by mail@gabrielegan.com »

Dear Ken

If your Teletype has not been modified to use the RS-232 protocol then it will be using 20ma current-loop signalling. As I understand it, these two protocols are digitally equivalent (the same string of noughts and ones represents an 'A', a 'B', and so on) but they are electrically different. RS-232 represents the difference between a nought and a one by differing voltages: a one is +12v and a nought is -12v. In fact, lots of RS-232 equipment will accept a smaller swing, between +5v and 0v, but the principle is the same: a voltage swing is doing the representing, and ideally very little current flows. But the Teletypes come from an older, pre-computer tradition, in which current not voltage does the representing: 20 milliamps flows for a short time (0.009 of a second I believe) to mark a one and no current flows for the same amount of time to represent a nought. The current is needed because substantial chunks of metal have to be physically moved inside the Teletype to decode the signal, using electromagnets.

So, unless it has been modified you need an RS-232-to-current-loop converter to connect your Teletype to the Altair clone. Mike Douglas, creator of the Altair Clone, sells one that fits right inside the ASR-33 Teletype at: http://deramp.com/tty_adapter.html. I'm using it and can report easy installation and faultless operation. (That was not my experience with other RS-232-to-current-loop converters I previously tried.) The only wrinkle is that Mike does not also supply the cable that goes from his converter to the Altair Clone, but he pointed me to two suppliers that sell the DB-25 connector and 'phone cable you need:

DB-25 connector:
https://www.computercablestore.com/modu ... rj12-beige

Phone cable (get CROSS WIRED) in the length you need:
https://www.computercablestore.com/4-co ... cables-136

After you read the instructions for Mike's converter, the role that the DB-25 connector and 'phone cable play in the operation are clear.

Regards

Gabriel Egan
De Montfort University
AltairClone
Site Admin
Posts: 661
Joined: April 5th, 2013, 10:55 am
Contact:

Re: Serial port settings for a real Teletype

Post by AltairClone »

kwiebe wrote:This is a great thread for me since I plan to connect a TTY to my clone soon. But for the TTY-clone cable, can one of you tell me the type of cable that works?
Ken,

Is this for your new '35 or for a '33?

Mike
kwiebe
Posts: 52
Joined: February 9th, 2019, 12:11 pm
Contact:

Re: Serial port settings for a real Teletype

Post by kwiebe »

AltairClone wrote:
kwiebe wrote:This is a great thread for me since I plan to connect a TTY to my clone soon. But for the TTY-clone cable, can one of you tell me the type of cable that works?
Ken,

Is this for your new '35 or for a '33?

Mike
Hi Mike,

Maybe both!

I built your current loop/RS-232 circuit (thanks!) and got it working with my 35. But I didn't connect it to the Altair clone yet. I wired it up to a DB-25 connector then used a DB-25 to DB-9 cable to connect it to (of all things) - an old Tandy word processor. That was just to prove the concept.

So for the 35 in this scenario, I was beginning to wonder what type of DB-25 to DB-25 cable for the clone, what clone port settings, whether a null modem might be required, etc.

Regarding a 33, with any luck I will have a 33 within a week so have begun thinking about interfacing a 33 with the clone. For that I'm thinking your plug-and-play converter is the way to go. And Gabriel's post and info on your website tell me what I need to know about the cable I think. Do you still have those converters for the 33 available? I will probably be placing an order soon.

Thanks,

Ken
-Ken
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 1 guest