Professional Documents
Culture Documents
The 8255 is a general purpose programmable I/O device designed for use with Intel
microprocessors. It consists of:
Three 8-bit bidirectional I/O ports (24 I/O lines) that can be configured to meet different
system I/O needs. The three ports are PORT A, PORT B & PORT C.
Port A contains one 8-bit output latch/buffer and one 8-bit input buffer.
Port B is same as PORT A .
However, PORT C can be split into two parts PORT C lower (PC0-PC3) and PORT C upper
(PC7-PC4) by the control word.
The three ports are divided in two groups Group A (PORT A and upper PORT C) Group B
(PORT B and lower PORT C).
The two groups can be programmed in three different modes.
The 8255 is contained in a 40-pin package, whose pin out is shown below:
If the most significant bit of control word or D7 is 1 then 8255 works in I/O mode else, if it’s
value is 0 it works in BSR mode.
1. BSR Mode – When MSB of the control register is zero(0), 8255 works in Bit Set-Reset
mode.in this only PC bit are used for set and reset.
2. I/O Mode – When MSB of the control register is one(1), 8255 works in Input-Output
mode.it is further divided into three categories.
3. Mode 0 – In this mode all three ports (PA, PB, PC) can work as simple input function or
output function also in this mode there is no interrupt handling capabilities.
4. Mode 1 – In this either port A or port B can work and port C bits are used as Handshake
signal before actual data transmission plus it has interrupt handling capabilities.
5. Mode 2 – In this only port A works and port B can work either in Mode 0 or Mode 1 and
the 6 bits of port C are used as Handshake signal plus it also has to interrupt handling
capability.
Operational modes
BSR mode stands for Bit Set Reset mode. The characteristics of BSR mode are:
BSR mode is selected only when D7 = 0 of the Control Word Register (CWR).
Concerned with bits of port C.
Individual bits of Port C can either be Set or Reset.
At a time, only a single bit of port C can be Set or Reset.
Is used for control or on/off switch.
BSR control word doesn’t affect ports A and B functioning.
Example: Obtain the control word when the ports of 8255A are to be used in mode 0 with port-A
as output port and port B as input port and port C as output port.
Solution. The control word for this case is given as:
Hope this discussion on control word format for 8255A , cleared your concept.
Explain how the different ports and control words are selected for 8255.
Ans. The two address lines, along with ̅̅̅̅ signal, determine the selection of a particular port or
control register. This is explained below: