Serial Line Unit Example

Serial Line Unit

A Serial Line Unit is the device that controls a serial line. You've all seen serial lines - these are the things we attach modems, mice, and terminals to.

Overview

A serial line unit is made up of two parts, a transmitter and a receiver. As you can guess, the transmitter is responsible for sending a character out on the serial line (to the attached modem, terminal, etc), and the receiver is responsible for taking a received character and giving it to the CPU. These two parts operate independently, but are built together normally, as we seldom have use for only either a transmitter or receiver.

The SLU (serial line unit) for the PDP-11 can operate in either polled-I/O mode or in interrupt-driven I/O mode. Communication with this SLU is memory mapped (we do not use any special I/O instructions to read from or write to its registers). Finally, the SLU is not a DMA device, memory <--> device transfers are programmed. This is not a problem on an SLU as there is only ever one character available in the receive buffer, and we can only put one character in the transmit buffer. Also, communication rates over SLUs are typically slow. It would be unusual for an SLU to be a DMA device.

From the programmers point of view, the PDP-11 SLU consists of a set of four, 16-bit registers. They are laid out as follows:


1