Section 18.1 Serial communication
In broad outline, a serial data link is shown in Figure 18.1.1, below. Serial data transmission has the great advantage of requiring less wiring and less space on a circuit board. The cost is the additional circuitry to serialize and deserialize the data, and the need to accommodate an N\(\times\) higher bit rate over the link. In many applications, the benefits outweigh the costs. Many integrated circuits, like analog-to-digital and digital-to-analog converters, send and receive data serially. Nearly all wired (e.g., USB) and wireless (e.g., Bluetooth) communications are serial.

The serializer includes a parallel-to-serial shift register to convert a data byte to a packet of bits in a serial stream. The deserializer has a serial-to-parallel shift register to reconstruct the byte from the received stream. Both transmitter and receiver have state machines to manage control signals and the shifting of the registers. The design of a serial link requires two problems to be addressed. Both concern the synchronization of the receiver with the transmitter.
- The deserializer’s register must shift at the proper times, once per bit, and safely within each bit.
- The deserializer must know when a new packet is arriving, so that the stream is properly framed into bytes.
There are many methods, or protocols, for serial communication, which solve these two problems in different ways. For example, the first problem can be solved by sending a clock signal from the transmitter to the receiver, at the cost of an additional wire. Alternatively, if the transmitter and receiver “agree” on a bit rate, then they can have their own clocks running at the same frequency. Then, the problem changes to making sure the receiver’s clock is in phase with the transmitter’s clock.
The framing problem can be solved by sending a parallel synchronization signal that is asserted with the first bit of a new packet. Alternatively, as we shall soon see, the framing signal can be embedded in the bitstream. A state machine inside the receiver sees this assertion and initiates shifting in response. The framing signal can also be used to adjust the phase of the receiver’s clock to make sure the register is shifted at the right time.
Serial protocols that send timing signals alongside the data are said to be synchronous. Other protocola embed the timing information in the bitstream and do not require synchronization signals. They are said to be asynchronous, though “self-synchronous” might be a better way to think about it.
The rest of this chapter introduces a classic asynchronous protocol, called the Universal Asynchronous Receiver and Transmitter, or UART. For most applications, the UART protocol has been superseded by faster methods, but it still used when simplicity is more valuable than speed. Many microcontrollers include pins to support UART communication, some wireless transceiver chips have UART interfaces, and the MIDI (Musical Instrument Digital Interface) protocol for keyboards and synthesizers uses UART communication.

