8255A I/O Operating Modes
8255A has three different I/O operating modes:
- Mode 0
- Also, Mode 1
- Mode 2
- Simple I/O for port A, B, and C
- In this mode, Port A and B is used as two 8-bit ports and Port C as two 4-bit ports.
- Moreover, Each port can be programmed in either input mode or output mode where outputs are latched and inputs are not latched.
- Ports do not have handshake or interrupt capability.
Mode 1: Input or Output with Handshake
- Handshake signal is exchanged between MPU and peripheral prior to data transfer.
- Also, In this mode, Port A and B is used as 8-bit I/O ports.
- Mode 1 is a handshake Mode whereby ports A and/or B use bits from port C as handshake signals.
- In the handshake mode, two types of I/O data transfer can be implemented: status checks and interrupt.
- Also, Port A uses upper 3 signals of Port C: PC3, PC4, PC5
- Port B uses lower 3 signals of Port C: PC0, PC1, PC2
- PC6 and PC7 are general purposes I/O pins
STB (Strobe Input)
- ALso, This active low signal generated by a peripheral device to indicate that, it has transmitted a byte of data. The 8255A, in response to STB, generates IBF and INTR.
IBF (Input Buffer Full)
This signal acknowledged by 8255A to indicate that the input latch has received the data byte. It will get reset when the MPU reads the data.
Also, This an output signal that may use to interrupt the MPU. This signal generated if STB, IBF, and INTE (internal flip-flop) all at logic 1. It will get reset by the falling edge of RD
- This signal an internal flip-flop used to enable or disable the generation of INTR signal.
- Also, The interrupt enables signal neither an input nor an output; it an internal bit programmed via the PC4 (port A) or PC2 (port B) bits.
Mode 2 in 8255A IO Operating Modes
- In this mode, Port A can configure as the bidirectional port and Port B either in Also Mode 0 or Mode 1.
- Moreover, Port A uses five signals from Port C as handshake signals for data transfer.
- The remaining three signals from Port C can use either as simple I/O or as the handshake for port B.