Suplementary notes on select topics in physics and electronics
Standing waves in a transmission line New

Operating modes of 8255A PPI New

Select theory of pn junction diode

Resonance in series LCR circuit

Wave packet and its dynamics

Theory of frequency modulation

Go back to main teaching page

A brief note on the different operating modes of the 8255A PPI device

The 8255A is one of several programmable peripheral interfacing devices manufactured by Intel. It is a general purpose programmable peripheral interfacing (PPI) chip. It is versatile in the sense that it is compatible with any microprocessor chip, not only the 8085. It can be used to interface the microprocessor with input and output peripheral devices through its three 8-bit ports, named Port A, Port B and Port C (Port C in effect comprising of two 4-bit ports, C_upper and C_lower).

The 8255A is primarily operated in two modes: I/O (input-output) mode and the BSR (Bit-Set-Reset) mode. The I/O mode is further grouped into Mode 0 (Simple I/O interfacing ), Mode 1 (Interfacing with handshake signals) and Mode 3 (Bidirectional I/O interfacing). Which mode a port of 8255A would operate in, which port would function as input and which as output as also other functions are determined by programming the 8255A through a microprocessor. By this it means, one can execute instructions on the microprocessor connected to the 8255A to change the bits of an 8-bit control word stored inside a control register inside the 8285A. For example, to perform simple I/O interfacing, with ports A and C_upper as input ports and ports B and C_lower as output ports, the bit pattern to be stored is: 1 0 0 1 1 0 0 0. (Refer any book to know exactly which bit corresponds to what!)

Each of the three ports as also the control register can be accessed by using either of 8-bit I/O mapped I/O scheme or 16-bit memory-mapped I/O scheme.

One can use the 8285A in Mode 1 to inteface the microprocessor with a slow responding peripheral like an 8-bit parallel printer using handshake signals. Data is transferred between the microprocessor and the peripheral through the ports A and B of 8255A, each of which uses control signals called handshake signals exchanged between 8255A and the peripheral through three lines of Port C. The signals used are the STB' (Strobe Input), IBF' (Input Buffer Full), OBF' (Output Buffer Full), ACK (Acknowledge) and INTR (Interrupt Request). The remaining 2 Port C lines can be used for simple I/O (Mode 0).

When operated in mode 2 (as in data transfer between two computers), only Port A can be used as a bidirectional port, implying it can be used, both to input as well as output data. It does so using handshake signals from 5 Port C lines. Port B can be used in mode 0 or mode 2. The remaining 3 Port C lines can also be used in Mode 0 (simple I/O) or as lines for handshake signals for Port B (Port B in Mode 1).

Finally, in BSR mode, the 8-bits of port C can be set or reset by writing an appropriate control word in the control register, with bit D7=0 indicating BSR mode of operation as against D7=1 which corresponded with I/O mode of operation. Very importantly, the I/O operations of Ports A and B are not affected by the BSR control word. BSR mode can be employed to make use of the bits of Port C to act as on/off switches.

To understand the operation of 8255A in different modes fully, one needs to study actual interfacing examples and go through the relevant instructions for the microprocessor which we will be (in fact are) doing in the class.

Go to page top

My main teaching page