Chapter 10 – Communication
暂无分享,去创建一个
Publisher Summary
The term communicationcovers an enormous range of possibilities in embedded electronic systems. This chapter deals with three common types of communication that current MSP430s can handle directly. All of them are serialcommunications, meaning that a single bit is transferred at a time. They are serial peripheral interface (SPI), inter-integrated circuit (I²C) bus, and asynchronous serial communication (usually called RS-232). Most MSP430s contain modules to handle straightforward communications in hardware. Out of these three, SPI and I²C share many characteristics while asynchronous communication is rather different. The major practical difference is that SPI and I²C are typically used between a microcontroller and other devices on the same PCB, while asynchronous communication is used to exchange data with other equipment such as a PC. Thus asynchronous systems must conform fully to established standards so that they work reliably and must be protected against electromagnetic interference and other hazards. This requires special interface circuits. On the other hand, simple wires are usually sufficient for SPI and I²C provided that all devices work at the same voltage. Furthermore, SPI and I²C have similar applications. The major difference between them is that I²C is a true bus, which is designed to accommodate a large number of devices. SPI and I²C are often used to communicate with port expanders to increase the effective number of pins for digital input and output, analog-to-digital and digital-to-analog converters, sensors with digital outputs, such as thermometers, external memory (dataflash, EEPROM), real-time clocks, and other processors.