written 6.2 years ago by |
8255 PPI supports three modes for data transfer:
Mode 0 (Simple Bi-directional I/O)
Port A and Port B used as two simple 8-bit I/O Ports. Port C is used as 2 simple 4-bit I/O Ports. Each port can be programmed as input or output individually. Ports do not have handshake or interrupting capability. Hence, slower devices cannot be interfaced.
Mode 1 (Handshake I/O)
In Mode 1, handshake signals are exchanged between the devices before the data transfer takes place. Port A and Port B used as two 8-bit I/O Ports that can programmed in input OR in output mode. Each Port uses 3 lines from Port C for handshake. The remaining lines of Port C can be used for simple IO. Interrupt driven data transfer and Status driven data transfer possible. Hence, slower devices can be interfaced.
Timing Diagram for Mode 1 Input Transfer
3. Mode 2 (Bi-directional Handshake I/O)
In this mode, Port A is used as an 8-bit bi-directional Handshake I/O Port. Port A requires 5 signals from Port C for doing Bi-directional handshake. Port B has the following options:
- Use the remaining 3 lines of Port C for handshaking so that Port B is in Mode 1. Here Port C lines will be completely used for handshaking (5 by Port A and 3 by Port B).
- Port B works in Mode 0 as simple I/O. In this case the remaining 3 lines of Port C can be used for data transfer.
- Port A can be used for data transfer between two computers as shown. The high-speed computer is known as the master and the dedicated computer is known as the slave. Handshaking process is similar to Mode 1.