Computers and Serial Communication

Back to the previous section, Early Computer Interfaces

4. Early Microprocessors and the UART

Video display terminals (VDTs) lifted many of the speed restrictions of mechanical teletypes. The modems used with mechanical teletypes were easily able to operate up to 300 Baud, so that became a standard speed for modem operation. Operation over direct wires allowed faster speeds, so multiples of two were used: 600, 1200, 2400, 4800 Baud and so on. Early modems could not go that fast, and it took a long time for modem speed to increase. The FSK (frequency shift keying) modulation used in earlier modems had to be abandoned, and it was replaced with complex modulation schemes based on both signal amplitude and phase, that made better use of the available bandwidth in a telephone line.

The need for electronic transmitters and receivers to deal with the high speeds that were being used in serial communication led to the development of one of the first and most famous large scale integrated circuits, the UART. Different manufacturers used different part numbers, such as AY-5-1013 and COM2502 and 6402, but most UARTS were pin and function compatible. UART stands for "Universal Asynchronous Receiver/Transmitter". Asynchronous refers to the fact that a new character can start at any time, and it is the use of a start bit that makes this possible. Universal meant that the parts could operate in a variety of modes, that covered most telecommunication uses of that time.

For example, a UART could operate with 5, 6, 7 or 8 data bits, could generate parity bits when transmitting and check them when receiving, could be programmed to use two stop bits when sending to a teletype or one when sending to a VDT. Usually, when programmed to transmit five data bits, the UART would generate 1.5 stop bits, an acceptable approximation of the 1.42 stop bits required by the Baudot code. The main function of a UART was to take a character in parallel form, that is all the bits at the same time, and output it as a serial teletype format signal, and to receive a serial teletype format signal and output all of the bits as once as a parallel character. Because they were electronic, UARTs were not limited by the slow speed of teletype mechanics, and the new higher speeds used by Video Display Terminals were easily achieved.

For early microprocessor systems, the addition of a UART was expensive, and so sometimes the microprocessor CPU itself was used to generate serial communications signals. Here is how it worked: when a program needed to send a character, it would call a special subroutine that would control a single output bit of the computer. That bit would be set to the space condition for the start bit, and the CPU would count in a loop for the time required by the start bit. Then each bit of the character was placed on the output bit in turn, while the time required for each bit was counted out by the CPU. Finally a stop bit was placed on the output, and the required time was counted out.

To input a character, the CPU had to be ready, and looking at a single input bit on the computer. When a start bit was detected, it was timed and checked to make sure that the start bit was not just noise. Then halfway through the first data bit, the input bit would be checked, and placed in the output character. This was done for each data bit in turn. If the stop bit was checked and found to not be a marking condition, this was called a framing error. By using the microprocessor to do its own serial communication, microcomputers could be made smaller and cheaper.

Sometimes the start bit and stop bit are not necessary, and all they do is slow things down. For example, if a clock is provided that ticks each time a bit is transmitted, then if you know when the message starts, all of the bits can be read without the need for start or stop bits, and communication will be that much faster. This is called Synchronous Serial communication, and variations on this method are used for magnetic tape storage, high speed networking, floppy and hard disks, and many other data storage and communication systems. Determining when the message starts is usually done using special characters called sync bytes (for synchronization) that do not normally appear in the data stream. Once the sender and receiver are synchronized, all of the bits in the message can be data, resulting in efficient communication.

When digital integrated circuits became inexpensive and widespread, this resulted in a revolution in the telephone industry, one that consumers scarcely noticed, except that the quality of service increased and the cost of service went down. Telephone companies had always struggled with the problems of long distances. When a telephone signal is amplified again and again electrical noise is introduced, and more noise is added just in the process of going through hundreds of miles of wire. In addition, the delay caused by long distances resulted in echos on long telephone lines, and special equipment had to be developed to keep phone lines from sounding like you were talking inside a bathtub.

Telephone engineers immediately recognized the benefits of digital technology. If a telephone signal could be converted to digital form, it could be transmitted any distance without any added noise, and the problem of echos on very long lines was eliminated. In addition, the telephone signals could be interconnected using digital logic rather than relays, which were large, noisy, slow, expensive and unreliable. If telephone exchanges were all electronic, they would be much faster, cheaper and more reliable.

A telephone signal is an analog signal, that is it varies continuously as time progresses, while binary digital signals take on one of two values. To make a telephone signal digital, the analog signal must be measured at a rate faster than it is changing, and each measurement must be converted into a number by a device called an Analog to Digital Converter (ADC). That number is then transmitted serially as binary digits, just like the bits of a teletype signal. At the receiving end, the serial bit stream is converted to parallel form, and a Digital to Analog converter (DAC) converts the number back into a voltage. The process happens 8,000 times per second, which is just fast enough to give an acceptable telephone signal.

Since long distance telephone communication is all digital, there is now very little difference between telephone communication and the transmission of computer data, and the networks of the big telecommunications companies can be used for either type of data just as easily.

On to the next section, Modern Serial Communication
Back to the Index
feedback to the author