MSP430 Microcontroller Basics

The term communication covers an enormous range of possibilities in embedded electronic systems. At one extreme we are continually promised the "Internet refrigerator," which will monitor its contents and reorder groceries to keep itself stocked. (It has not arrived in my kitchen yet.) At the other limit, a small microcontroller might need to store data in an external memory chip, which requires communication across a few millimeters of printed circuit board. This grabs fewer headlines but is more typical of small embedded systems, where the MSP430 is likely to be found. There are plenty of intermediate examples too. Information might be downloaded from a datalogger by connecting it to a personal computer. In the past this would probably have been done with a serial (RS-232); the interface is termed a universal asynchronous receiver/transmitter (UART) cable, which is easy for a MCU. Now it is more likely to use a universal serial bus (USB), which is convenient for the user but much harder work for the embedded system. Short-range wireless communications are also growing in importance with the rise of ZigBee and other low-power systems, designed with embedded systems in mind.
I devote most of this chapter to three common types of communication that current MSP430s can handle directly. All of them are serial communications, meaning that a single bit is transferred at a time. They are
Serial peripheral interface (SPI).
Inter-integrated circuit (I 2C) bus.
Asynchronous serial communication (usually, if inaccurately, called RS-232).
Most MSP430s contain...