EMBEDDED SYSTEMS
UNITS IV & V
Interfacing methods
The interfacing of an I/O device to an embedded system is always an important task. Generally interfacing means , both the physical connections of the hardware devices and the software routines that effect the data transfer .Due to incompatibility in speeds of the microcontroller and I/O devices ,there is always a problem in data transfer between two devices .This leads to a concept called ‘Latency’. Latency is nothing but the time between the interrupt request from the I/O device and the initiation of service by the microprocessor (or) controller. This latency includes both hardware delays and software delays .The software latency is the time between the availability of new data and the software reading. Another important aspect in I/O interfacing is the throughput (or) bandwidth. The bandwidth is the maximum data flow (bytes per second ) that can be processed by the system .Sometimes the bandwidth is limited by the I/O device while other times it is limited by the software . So to transfer the data synchronously between I/O device and the embedded system , there are two synchronization techniques ,they are a) Blind cycle counting synchronization. b) Gadfly (or) Busy waiting synchronization.
Blind cycle counting synchronization :
Blind cycle is appropriate for fixed and known I/O delays i.e Blind cycle is a method where the software simply waits a fixed amount of time and assumes that the I/O will complete before that fixed delay has elapsed. For an input device, the software triggers (starts) the external input hardware, wait a specified time, then reads data from device. For an output device, the software writes data to the output device, triggers (starts) the