Microcontrollers in Practice

This chapter is an introduction to serial communication. It contains the description of the asynchronous serial communication interface of HC11, AVR, and 8051, as well as an overview of the RS232 and RS422/485 interfaces, and the principles of creating simple microcontroller networks.
The main distinctive feature of a serial communication system is that data is handled in series, i.e. bit by bit. The simplest serial communication device is the shift register. Consider the example in Fig. 3.1, where two shift registers are connected in such a way that the content of the first, called the transmitter, is transferred to the second, called the receiver.
Note that, in this case, the shift clock CLK, and the control signals SH/LD\ and RSTR must be generated at the transmitter level, at precise moments of time (see Fig. 3.2.) and transmitted along with data on the communication line. Such a communication system, where the transmission clock is sent to the communication line, is called synchronous communication.
The problem becomes more complicated when it is not possible to send the serial clock over the communication line. In this situation, the receiver must generate its own clock, RxCLK, to shift data into the Rx shift register.
This type of serial communication, where the serial clock is not transmitted on the communication line, is...