What is Handshaking?


Handshaking is an I/O control approach to synchronize I/O devices with the microprocessor. As several I/O devices accept or release data at a much lower cost than the microprocessor, this technique is used to control the microprocessor to operate with an I/O device at the I/O devices data transfer rate.

The drawback of the strobe approach is that the source unit that starts the transfer has no method of knowing whether the destination unit has received the data element that was located in the bus. A destination unit that initiates the transfer has no method of knowing whether the source unit has located the information on the bus.

The handshake approach solves this issue by introducing a second control signal that supports a response to the unit that initiates the transfer. The basic feature of the two-wire handshaking approach of data transfer is as follows. One control line is in an equal direction as the data flow in the bus from the source to the destination.

It is used by the source unit to update the destination unit whether there are true data in the bus. The other control line is in the other direction from the destination to the source. It is used by the destination unit to update the source whether it can accept information. The sequence of control during the transfer is based on the unit that initiates the transfer.

The diagram shows the data transfer process when initiated by the source. The two handshaking lines are data valid, which is created by the source unit, and data accepted, created by the destination unit. The timing diagram displays the exchange of signals between the two units.

The sequence of events showed in part (c) shows the four possible states that the system can be at any given time. The source unit initiates the transfer by locating the information on the bus and enabling its data valid signal. The data accepted signal is activated by the destination unit after it obtains the data from the bus.

The destination-initiated transfer using handshaking lines is shown in the figure. The name of the signal created by the destination unit has been modified to ready for data to reflect its new definition. The source unit in this case does not locate data on the bus until after it takes the ready-for-data signal from the destination unit.

The sequence of events in both cases would be equal if it can consider the ready-for-data signal as the complement of data accepted. The only difference between the source-initiated and the destination-initiated transfer is in their choice of the initial state.

Updated on: 31-Oct-2023

21K+ Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements