Page 1 of 1

Serial port options

PostPosted: April 26th, 2018, 7:10 am
For teaching purposes, I'd really like Ports 2 and 3 on my Altair to be 88-SIO ports connected to a dumb terminal and a paper-tape punch respectively, leaving Port 1 as a 2SIO port for taking supervisory control of the Altair via a laptop and a USB/Serial cable. What I want to teach is the low-level control of the ports (as in the early video of the keyboard being echoed to the screen) and the 88-SIO mode seems easier for teaching that than the 2SIO mode (which has lots of options I don't want to introduce to the students).

But I'm right in thinking that we can't have Ports 2 and 3 both be 88-SIO ports aren't I? Whenever I try setting the second one of these two to 88-SIO the other one flips back to being 2SIO.

Assuming I can't have Ports 2 and 3 both being 88-SIO ports, could someone tell me the simplest machine code instructions for setting up one 2SIO port to be, say, 9600 baud 8N1 and then another be 300 baud 8N1? Once they're set up, presumably all I need to do is keep polling a single bit in the control word--looks like its bits 0 and 1 instead of bits 0 and 7 as I do with 88-SIO--and all else is the same one the port is set up. I've got the 2SIO manual in front of me and the number of options (to do with setting the baud rate in software) is bewildering.

I don't mind which two ports I have as the easy-to-program 88-SIO ports: it could be Port 1 and Port 2 if only I were allowed use Port 3 for the Configuration Monitor, if that's possible.


Gabriel Egan

Re: Serial port options

PostPosted: April 26th, 2018, 4:06 pm
by AltairClone

You are correct, ports 2 & 3 cannot both be SIO ports at the same time. Ports 2 & 3 (respectively within each line below) can be combined in three ways:

1) 2SIO@12h, 2SIO@14h
2) 2SIO@12h, SIO@06h
3) SIO@06h, 2SIO@14h

Baud rate is not under software control with a real 2SIO board. It has to be configured with jumpers on the board. Similarly, you can independently use or bypass the routing of the CTS, RTS, and DCD signals to the 6850 ACIA depending on your application. In the Clone, these hardware configurations are set in the Configuration Monitor.

For your purposes, I'd use the Configuration Monitor to set ports 2 and 3 to be 2SIO, use the baud rate menu to set port 2 to 9600 baud and port 3 to 300 baud, and finally, use the "CTS, RTS Usage" menu and choose option 1, "CTS, RTS, Always Asserted" for both ports.

Add the code below prior to your character processing loop, and then as you mention, the rest of the code is basically the same for 2SIO or SIO by changing the flag bit definitions. Receive data present is bit 0 and transmit ready is bit 1. These are positive logic flags as opposed to the inverted flags of the SIO.

Code: Select all
   mvi   a,03h   ;reset UARTs
   out   12h
   out   14h

   mvi   a,15h   ;no ints, 8N1, /16 clock
   out   12h
   out   14h


Re: Serial port options

PostPosted: April 29th, 2018, 12:06 pm
Oh, I was so close! I'd got from the 2SIO manual that 00000011b has to go to each 2SIO serial port's control word to do a Master Reset. And I'd guessed that then the control word had to have its bits 1 and 0 set to 01b for "divide clock by 16" (the manual implies that this is the normal mode but I'm not clear what it means), and its bits 4, 3, and 2 set to 101b for 8N1 operation. But then I flubbed the last part and wrongly set bits 7, 6, and 5: it makes sense now that we want 000b for interrupts disabled.

Great, with these settings I can send bytes to and from dumb terminals and paper-tape punches using the 2SIO ports -- all working as expected. Much obliged, Mike.