Sam Coupe Scrapbook

Technical Section
- Comms Interface - Parallel Printer Ports

Information provided by: Andrew Gale

The SAM allows 8 i/o ports for the comms interface - PRINTL on the expansion port goes low when any of these are being addressed. Ports 232 & 233 are for parallel printer port#1, 234 & 235 for parallel printer port#2, and 236-239 are for the serial interface, which we won't cover here.

How do you send a byte to the printer? First read port 233 - if bit 0 is set to '1' then the printer is busy and is not ready to accept any data - so keep on testing bit 0 until it becomes logic '0'. Next output your byte to port 232 then output 01 to port 233, wait for 1 microsecond and then output 00. Doing this pulls the printer's /STROBE line low temporarily, telling it that there is a byte for it to print. (/STROBE is fed with an inverted version of bit 0.) For printer port#2, just use ports 234 & 235 in place of 232 & 233 respectively. PRINTL on the expansion port is low whenever an i/o port in the range 232 to 239 is being addressed.

Note that the serial interface actually uses address line 8, 9 & 10 to access different registers of the ACIA, and that a0 and a1 are used to select which comms interface you are talking to - upto 4 serial ports can be added, each given a different address set by internal jumpers.

Previous Site Sam Coupe Web Ring Site List Next Site