0
12kviews
Write a brief note on programmable peripheral interface (PPI) IC 8255 and its modes of Operation.
1 Answer
0
104views
  1. The 8255 is a programmable peripheral interface i.e. PPI 8255.
  2. It is a general purpose programmable parallel I/O device.
  3. It contains 3 I/O ports which can be programmed in different modes.
  4. To program the function to all three I/O ports it contains a register called as control register. The control register defines the function of each I/O port and in which mode they should operate.
  5. 8255 is a general purpose in nature and provides many facilities for connecting different devices. So it is used frequently in different applications.
  6. Features of 8255:
    • It is a programmable parallel I/O device.
    • It contains 24 programmable I/O pins arranged as 2-8 bit ports and 2-4 bit ports.
    • It has 3, 8 bit ports: Port A, Port B and Port C which are arranged in two groups of 12 pins.
    • It is fully compatible with Intel microprocessor families.
    • It is TTL compatible.
    • Direct bit set/reset capability is available for port C.
    • It has improved DC driving capability.

Modes of operation:

  1. The 8255 IC provides one control word register.
  2. It is selected when $A_0= 1, A_1 = 1, \overline{CS} = 0 \ \ and \ \ \overline{WR} = 0$. The read operation is not allowed for control register.
  3. The bit pattern loaded in control word register specifies an I/O function for each port and the mode of operation in which the ports are to be used.
  4. There are two different control word formats which specify two basic modes:
    • BSR (Bit set reset) mode
    • I/O mode
  5. The two basic modes are selected by $D_7$ bit of control register. When $D_7 = 1$ it is an I/O mode and when $D_7 = 0$; it is a BSR mode.

BSR mode-

  1. The BSR mode is a port C bit set/reset mode.
  2. The individual bit of port C can be set or reset by writing control word in the control register.
  3. The control word format of BSR mode is as shown in the figure below

enter image description here

  1. The pin of port C is selected using bit select bits [b b b] and set or reset is decided by bit S/R ̅.
  2. The BSR mode affects only one bit of port C at a time. 6.0The bit set using BSR mode remains set unless and until you change the bit. So to set any bit of port C, bit pattern is loaded in control register.
  3. If a BSR mode is selected it will not affect I/O mode.

I/O modes-

There are three I/O modes of operation:

  • Mode 0- Basic I/O
  • Mode 1- Strobed I/O
  • Mode 2- Bi-directional I/O

The I/O modes are programmed using control register.

The control word format of I/O modes is as shown in the figure below:

enter image description here

Function of each bit is as follows:

  1. $D_7$ – When the bit $D_7$ = 1 then I/O mode is selected, if $D_7 = 0$ then BSR mode is selected. The function of bits $D_0$ to $D_6$ is independent on mode (I/O mode or BSR mode).
  2. $D_6$ and $D_5$ – In I/O mode the bits D6 and D5 specifies the different I/O modes for group A i.e. Mode 0, Mode 1 and Mode 2 for port A and port C upper.
  3. D4 and D3 – In I/O mode the bits $D_4$ and $D_3$ selects the port function for group A. If these bits = 1 the respective port specified is used as input port. But if bit = 0, the port is used as output port.
  4. $D_2$ – In I/O mode the bit $D_2$ specifies the different I/O modes for group B i.e. Mode 0 and Mode 1 for port B and port C lower.
  5. $D_1$ and $D_0$ – In I/O mode the bits $D_1$ and $D_0$ selects the port function for group B. If these bits = 1 the respective port specified is used as input port. But if bit = 0, the port is used as output port.

All the 3 modes i.e. Mode 0, Mode 1 and Mode 2 are only for group A ports, but for group B only 2 modes i.e. Mode 0 and Mode 1 are provided. When 8255 is reset, it will clear control word register contents and all the ports are set to input mode. The ports of 8255 can be programmed for other modes by sending appropriate bit pattern to control register.

Please log in to add an answer.