Communicating with sensors
In the previous section, we looked at a variety of sensor types suitable for measuring various attributes of an embedded system and its environment. As part of each sensor measurement, the sensed data must be forwarded to the system processor. This section examines the most common interface technologies used in embedded systems for communication between sensors and processors.
GPIO
A General-Purpose I/O (GPIO) input signal is simply a physical pin on the processor that, when read, indicates whether the voltage at the pin is low (near 0V) or high (near the upper end of the processor I/O voltage range, often 5V or 3.3V). GPIO inputs can be used to detect operator actions such as button presses, or to determine whether the system is in an unsafe condition, perhaps by using a switch to detect when a safety-critical cover has been opened.
A GPIO input signal can be used with an analog sensor to detect when the analog signal is above or below a threshold...