Page 1 of 1

Teletype ASR-33 comms

PostPosted: July 11th, 2018, 3:57 am
by mail@gabrielegan.com
I've written some machine code for my Altair clone to communicate directly with my Teletype ASR-33 and there seems to be a problem with how fast the ASR-33 can accept characters. I'm using a 2SIO port set to 110 baud and before sending each character I check for the serial port's status byte's second-least-significant-bit transitioning from zero to one (indicating ready-to-receive). But I get overruns: the ASR-33 misses out characters, presumably because it can't keep up with the rate that the serial port is sending them. Using the same port and settings, BASIC can print to the ASR-33, so it's not a fault with the Teletype or its RS232-current-loop converter. If I introduce a delay loop so that the user has to press a key on the ASR-33's keyboard before each character is sent to the ASR-33, the overruns disappear.

I thought that a device being 110 baud meant not only that each bit lasts 1/110th of a second, but also that the device could accept bits continuously at that rate. Is this not so? Does anybody now the real maximum receive rate of an ASR-33, or should I just experiment with delay loops (like decrementing a 16-bit counter to zero) to see what works in practice?

Regards

Gabriel Egan

Re: Teletype ASR-33 comms

PostPosted: July 11th, 2018, 10:38 am
by AltairClone
Gabriel,

Most likely you've initialized the 6850 on the 2SIO for one stop bit instead of two. The Teletype requires two stop bits. Use 11h instead of 15h in your 2SIO initialization code. No delay loops are required.

Mike

Re: Teletype ASR-33 comms

PostPosted: July 12th, 2018, 6:36 am
by mail@gabrielegan.com
Ah, that's it! Works fine now, thanks. I guess that if a stop bit puts the line into the same quiescent state as not transmitting anything does, then this makes complete sense. That is, the extra stop bit is just like the pause I was inserting between characters. After getting your suggestion I was worried that the two-stop-bits setting would work on the ASR-33 but not on the other terminals in my lab, a mix of ADM-5s, an ASR-43, and other assorted relics. That would be a problem as I want the students to all be using the same 'initialize serial ports' subroutine no matter which terminal they happen to be on. But in fact the two-stop-bits setting also works on all these other terminals. I guess that also confirms that the stop-bit setting (taking the line high?) is the same as the quiescent state.

Regards

Gabriel

Re: Teletype ASR-33 comms

PostPosted: July 12th, 2018, 1:10 pm
by AltairClone
Yes, you've got it - the extra stop bit is just one more bit time at the idle state.

Mike