The Universal Asynchronous Receiver Transmitter UARTThe basic function of the UART is to facilitate parallel-to-serial and serial-to-parallel data conversion.
The UART usually contains one transmitter and one receiver. The receiver and transmitter can operate
simultaneously and independently. The UART can operate in full-duplex or half-duplex mode.
Parallel data from the host computer are converted to an asynchronous serial bit stream. The UART
automatically adds a start bit, an optional parity bit, and the programmed number of stop bits, and sends
the stream out through the transmitter serial data output (TxD) output pin. The parallel data are converted
to a serial stream with the least significant bit shifted out first. Figure 16.7 shows a typical arrangement
for UART. As can be seen, the UART uses TTL (transistor transistor logic) compatible interface. The
TIA/EIA (see later) transmission line drivers and receivers are specific to a particular interface; thus,
changing system interface means changing the transmission medium and the relevant drivers and receivers.
The use of UART is independent of the transmission medium.
Serial data received on the receiver serial data input (RxD) pin is converted to parallel data. In the
process the UART checks the start bit, parity bit (if any), and stop bit and reports any error conditions.
Note that the UART is capable of generating all signals required for successful bit-serial asynchronous
communications.
The UART can also report a number of error conditions, including receiver overrun, parity error, framing
error, and break error. Receiver overrun error occurs when the bytes are received faster than the computer
processes them. The parity error is indicated if the parity of the bit stream changed during the communication process. Framing error is reported if the sampled stop bit is not at logic 1 level. The break
error is reported if the communication line is idle for the time equivalent to the duration of at least one
character.
Older types of UART devices such as 8250, 16450 had only one byte FIFO (first in first out) buffer and
thus it was easy to overrun the receiver buffer. More recent devices are equipped with larger buffers providing
more efficient communications. For example, device 16550D from National Semiconductor has a 16-byte
receiver buffer and a 16-byte transmitter buffer and can operate at speeds up to 1.5 Mbps. Modern UARTs
can also automatically handle tasks pertaining to multi-drop systems on a network
|