8155 Handshake Input and Output Port

8155 Handshake Input Port:

The signals used for data transfer between the input device and microprocessor using port-A of 8155 as the handshake input port are shown in Fig:

1. The input device checks the Buffer Full (BFA) signal. If BFA is low then it places the data on port lines and asserts strobe (STBA) low, to inform the port.

2. At the falling edge of STBA, the BF signal is asserted high to inform the input device that the port is full and it has to wait.

3. The input device asserts the STBA signal as high after a predefined time and when it is asserted high, the 8155 generates an interrupt signal to the processor (INTRA).

4. On receiving an interrupt request the processor executes a subroutine to read the data from the port.

5. The data is read by the processor using an RD signal. At the rising edge of RD, the BFA and INTRA signals are asserted low, and now the input device can send the next data to the port.

8155 Handshake Output Port:

The signals used for data transfer between the output device and microprocessor using port-A of 8155 as handshake output port is shown in below Fig:

1. When the port is empty the processor writes a byte into the port.

2. For writing data to the port, the processor asserts the WR signal as low and then high. At the falling edge of WR, the INTRA.is reset (asserted low) and at the rising edge of WR the BFA is asserted high.

3. The BFA signal informs the output device that the data is ready for it. If the output device accepts the data byte, then it asserts STBA low and then high.

4. When the strobe is low, the BFA is reset to low, and at the rising edge of the strobe, the INTRA goes high to interrupt the processor.

5. When the processor is interrupted, it executes an interrupt service routine to load the next data in the output port.