In order to use port A or port B for handshake input or output operation, we initialize that port in mode 1. Some of the pins of port C function as handshake lines.
For port B in this mode, PC0, PC1 and PC2 pins function as handshake lines.
If port A is initialized as mode 1 input port, then, PC3, PC4 and PC5 function as handshake signals. Pins PC6 and PC7 are available for use as input/output lines.
The mode 1 which supports handshaking has following features:
- Two ports i.e. port A and B can be used as 8-bit I/O ports.
- Each port uses three lines of port c as handshake signal and remaining two signals can be used as I/O ports.
- Interrupt logic is supported.
- Input and Output data are latched.
Input Handshaking signals
- IBF (Input Buffer Full) - It is an output indicating that the input latch contains information.
- STB (Strobed Input) - The strobe input loads data into the port latch, which holds the information until it is input to the microprocessor via the IN instruction.
- INTR (Interrupt request) - It is an output that requests an interrupt. The INTR pin becomes logic 1 when the STB input returns to a logic 1, and is cleared when the data are input from the port by the microprocessor.
- INTE (Interrupt enable) - It is neither an input nor an output; it is an internal bit programmed via the port PC4 (port A) or PC2 (port B) bit position.
Output Handshaking signals
- OBF (Output Buffer Full) - It is an output that goes low whenever data are output(OUT) to the port A or port B latch. This signal is set to logic 1 whenever the ACK pulse returns from the external device.
- ACK (Acknowledge)-It causes the OBF pin to return to a logic 1 level. The ACK signal is a response from an external device, indicating that it has received the data from the 82C55A port.
- INTR (Interrupt request) - It is a signal that often interrupts the microprocessor when the external device receives the data via the signa, this pin is qualified by the internal INTE(interrupt enable) bit.
- INTE (Interrupt enable) - It is neither an input nor an output; it is an internal bit programmed to enable or disable the INTR pin. The INTE A bit is programmed using the PC6 bit and INTE B is programmed using the PC2 bit.