Synchronous data transfer

Synchronous means “at the same time”.The device which sends data and the device which receives data are synchronized with the same clock.When the CPU and I/O devices match in speed,this technique of data transfer is employed.The data transfer with I/O devices is performed executing IN or OUT instructions for I/O mapped I/O devices or memory read/write instructions for memory mapped I/O devices.

The IN instruction is used to read data from an input device or input port.The OUT instruction is used to send data from the CPU to an output device or output port.As the CPU and the I/O device match in speed, the I/O device is ready to transfer data when IN or OUT instruction is issued by the CPU.The status of the I/O device i.e. whether it is ready or not,is not examined before data are transferred,as it is not needed.

The I/O devices compatible with microprocessor in speed are usually not available.Hence,this technique of data transfer is rarely used for I/O devices.However,memories compatible with microprocessors are available, and therefore,this technique used with compatible memory devices.

Asynchronous data transfer

Asynchronous means “at regular intervals”.In this method data transfer is not based on predetermined timing pattern.This technique of data transfer is used when the speed of an I/O device does not match the speed of the microprocessor, and the timing characteristic of I/O device is not predictable.In this technique the status of the I/O device i.e. whether the device is ready or not, is checked by the microprocessor before the data are transferred.

The microprocessor initiates the I/O device to get ready and then continuously checks the status of the I/O device till the I/O device becomes ready to transfer data.This method of data transfer is also called handshaking mode of data transfer because some signals are exchanged between the I/O device and microprocessor before the actual data transfer takes place.

The microprocessor issues an initiating signal to the I/O device to get ready(or to start).When I/O device becomes ready it sends signals to the processor to indicate that it is ready.Such signals are called handshake signals.

Some simple I/O devices may not have status signal.In such a case the microprocessor goes on checking whether data are available on the port or not. A keyboard interfaced to a microprocessor is an example of this type of data transfer scheme.