8255 Programmable Peripheral Interface
8255 Programmable Peripheral Interface
8255 Programmable Peripheral Interface
LECTURE 27
8255 PROGRAMMABLE PERIPHERAL INTERFACE
Sukantho Sikder
PROGRAMMABLE PERIPHERAL
INTERFACE
• PPI IC is the supporting IC of the microprocessor which is used to interface
I/O device with microprocessor.
• Since, microprocessor has fixed number of data and address bus lines and
none of the lines are dedicated for I/O interfacing.
Port A
Input
device
Port B Output
8055 8255
device
Port C
Input
device
IC 8255
BLOCK DIAGRAM OF 8255
CONTROL REGISTER AND PORT ADDRESS
𝐶𝑆 A1 A0 Selected
0 0 0 Port A
0 0 1 Port B
0 1 0 Port C
0 1 1 Control
Register
1 X X 8255 is
not
selected
CONTROL WORD
• Contents of the control register are called the control word and they
specify an I/O function for each port.
• This register can be accessed to write a control word when A0 and
A1
are at logic 1.
• This register is not accessible for read operation.
• There are two types of control word for PPI IC
• BSR Mode – Bit Set Reset Mode
• I/O mode- Input output mode
Mode 0 - Simple Input or Output
Mode 1 - Handshake Input or Output
Mode 2 - Bidirectional Input or Output
CONTROL WORD
D7 D6 D5 D4 D3 D2 D1 D0
0 1
BSR MODE
For PORT C I/O
No effect on PORT Mode
A and PORT B
MODE 1
• Port A and Port B both are designed to operate in this mode of
operation.
• When Port A and B are programmed in Mode 1 and are
configured as input ports, then, Port A uses the upper three
signals of Port C: PC3, PC4, PC5 where as Port B uses the lower
MODE 2
• This is a bidirectional mode of operation.
• Port A can be programmed to operate as a bidirectional port.
• Mode 2 operation is only for Port A.
• When Port A is programmed as Mode 2, Port B can be used
either as Mode 0 or 1.
BSR
MODE
• This mode is concerned only with the eight bits of Port C, which
can be set/reset by writing appropriate control word.
D7 D6 D5 D4 D3 D2 D0
0 X X X Set/Rese
D1 t
Bit Select 1 = Set
000= Bit 0 0 = Reset