The device changes incoming parallel information to serial data which can be sent on a communication line. A second UART can be used to receive the information. The UART performs all the tasks, timing, parity checking, etc. The only extra devices attached are line driver chips capable of transforming the TTL level signals to line voltages and vice versa. To use the UART in different environments, registers are accessible to set or review the communication parameters. Setable parameters are for example the communication speed, the type of parity check, and the way incoming information is signaled to the running software.
|Published (Last):||22 September 2004|
|PDF File Size:||10.75 Mb|
|ePub File Size:||20.57 Mb|
|Price:||Free* [*Free Regsitration Required]|
The device changes incoming parallel information to serial data which can be sent on a communication line. A second UART can be used to receive the information. The UART performs all the tasks, timing, parity checking, etc. The only extra devices attached are line driver chips capable of transforming the TTL level signals to line voltages and vice versa.
To use the UART in different environments, registers are accessible to set or review the communication parameters. Setable parameters are for example the communication speed, the type of parity check, and the way incoming information is signaled to the running software. In the years after, new family members were introduced like the A and B revisions and the The last one was first implemented in the AT.
The higher bus speed in this computer could not be reached by the series. The differences between these first UART series were rather minor. The most important property changed with each new release was the maximum allowed speed at the processor bus side. The was capable of handling a communication speed of The demand for higher speeds led to the development of newer series which would be able to release the main processor from some of its tasks.
The main problem with the original series was the need to perform a software action for each single byte to transmit or receive. To overcome this problem, the was released which contained two on-board FIFO buffers, each capable of storing 16 bytes. One buffer for incoming, and one buffer for outgoing bytes. The chip contained a firmware bug which made it impossible to use the buffers. This made it possible to increase maximum reliable communication speeds to This speed was necessary to use effectively modems with on-board compression.
A further enhancement introduced with the was the ability to use DMA, direct memory access for the data transfer. Two pins were redefined for this purpose. DMA transfer is not used with most applications.
The following table shows, where each register can be found. The communication between the processor and the UART is completely controlled by twelve registers. These registers can be read or written to check and change the behavior of the communication device.
Each register is eight bits wide. The function of each register will be discussed here in detail. If FIFO buffering is used, each new read action of the register will return the next byte, until no more bytes are present. This bit will change to zero if no more bytes are present. The THR, transmitter holding register is used to buffer outgoing characters.
If no FIFO buffering is used, only one character can be stored. Otherwise the amount of characters depends on the type of UART. If FIFO buffering is used, more than one character can be written to the transmitter holding register when the bit signals an empty state. There is no indication of the amount of bytes currently present in the transmitter FIFO. The transmitter holding register is not used to transfer the data directly. The byte is first transferred to a shift register where the information is broken in single bits which are sent one by one.
The smartest way to perform serial communications on a PC is using interrupt driven routines. In that configuration, it is not necessary to poll the registers of the UART periodically for state changes. The UART will signal each change by generating a processor interrupt. A software routine must be present to handle the interrupt and to check what state change was responsible for it.
Interrupts are not generated, unless the UART is told to do so. This is done by setting bits in the IER, interrupt enable register. A UART is capable of generating a processor interrupt when a state change on the communication device occurs. One interrupt signal is used to call attention.
This means, that additional information is needed for the software before the necessary actions can be performed. The IIR, interrupt identification register is helpful in this situation. Its bits show the current state of the UART and which state change caused the interrupt to occur. The other bits are used to select a specific FIFO mode. The LCR, line control register is used at initialization to set the communication parameters.
Parity and number of data bits can be changed for example. Because they are only accessed at initialization when no communication occurs this register swapping has no influence on performance.
The UART is capable of generating a trailing bit at the end of each data-word which can be used to check some data distortion. Because only one bit is used, the parity system is capable of detecting only an odd number of false bits. If an even number of bits has been flipped, the error will not be seen. When even parity is selected, the UART assures that the number of high bit values in the sent or received data is always even.
Odd parity setting does the opposite. Using stick parity has very little use. The MCR, modem control register is used to perform handshaking actions with the attached device.
In the original UART series including the , setting and resetting of the control signals must be done by software. The new is capable of handling flow control automatically, thereby reducing the load on the processor. The two auxiliary outputs are user definable. This is mainly for MIDI purposes. The LSR, line status register shows the current state of communication. Errors are reflected in this register.
The state of the receive and transmit buffers is also available. The MSR, modem status register contains information about the four incoming modem control lines on the device. The information is split in two nibbles. The four most significant bits contain information about the current state of the inputs where the least significant bits are used to indicate state changes.
The four LSBs are reset, each time the register is read. It can be used to store one byte of information. In practice, it has only limited use. Because the series are only found in XTs even this use of the register is not commonly seen anymore. For generating its timing information, each UART uses an oscillator generating a frequency of about 1. To change the communication speed, the frequency can be further decreased by dividing it by a programmable value.
Therefore, the divisor is stored in two separate bytes, the divisor latch registers DLL and DLM which contain the least, and most significant byte. For error free communication, it is necessary that both the transmitting and receiving UART use the same time base.
Default values have been defined which are commonly used. The table shows the most common values with the appropriate settings of the divisor latch bytes. Note that these values only hold for a PC compatible system where a clock frequency of 1.
The corrected -A version was released in by National Semiconductor. The part was originally made by National Semiconductor. Similarly numbered devices, with varying levels of compatibility with the original National Semiconductor part, are made by other manufacturers. Exchange of the having only a one-byte received data buffer with a , and occasionally patching or setting system software to be aware of the FIFO feature of the new chip, improved the reliability and stability of high-speed connections. The current version since by Texas Instruments which bought National Semiconductor is called the D. This generated high rates of interrupts as transfer speeds increased. More critically, with only a 1-byte buffer there is a genuine risk that a received byte will be overwritten if interrupt service delays occur.
Serial UART information