Professional Documents
Culture Documents
FALLSEM2022-23 CSE2006 ETH VL2022230103866 Reference Material I 22-08-2022 8255
FALLSEM2022-23 CSE2006 ETH VL2022230103866 Reference Material I 22-08-2022 8255
RD WR CS A1 A0 Function
X X 1 X X Data bus tristated
1 1 0 X X Data bus tristated
Mode 0
• The salient features of this mode are as listed below:
1. Two 8-bit ports ( port A and port B )and two 4-bit ports
(port C upper and lower ) are available. The two 4-bit
ports can be combinedly used as a third 8-bit port.
2. Any port can be used as an input or output port.
3. Output ports are latched. Input ports are not latched.
4. A maximum of four ports are available so that overall 16
I/O configuration are possible.
• All these modes can be selected by programming a
register internal to 8255 known as CWR.
• The control word register has two formats. The first format
is valid for I/O modes of operation, i.e. modes 0, mode 1
and mode 2 while the second format is valid for bit
set/reset (BSR) mode of operation. These formats are
shown in following fig.
D7 D6 D5 D4 D3 D2 D1 D0
1 X X X
0- Reset
0-for BSR mode Bit select flags 1- Set
D3, D2, D1 are from 000 to 111 for bits PC0 TO PC7
CS PC4-PC7
RESET
8255A
PC0-PC3
A0
A1 PB0-PB7
RD
Vcc
WR
GND
Signals of 8255
3 4 PA0-PA7
Group A Group A
control Port A(8)
1
D0-D7 Data bus Group A PC7-PC4
Buffer Port C
8 bit int data bus upper(4)
Group B PC0-PC3
2 Port C
RD Lower(4)
WR READ/
WRITE PB7-PB0
A0
Control Group B Group B
A1 Logic control Port B(8)
RESET
CS
Block Diagram of 8255
D7 D6 D5 D4 D3 D2 D1 D0
Mode for PA PC U Mode PB PC L
Port A for PB
Mode Set flag
1- active
0- BSR mode
Group - A Group - B
1 Input
PC u PCL 1 Input
0 Output
0 Output
1 Input
PA PB 1 Input
0 Output
00 – mode 0 0 Output
Mode
01 – mode 1 Mode 0 mode- 0
Select
10 – mode 2 Select
of PA 1 mode- 1
PC0 INTR
PC3 INTRA A
RD PC6 – PC7 I/O
RD
Mode 1 Control Word Group A Mode 1 Control Word Group B
I/P I/P
STB
IBF
INTR
RD
DATA from
Peripheral
OBF
INTR
ACK
Data OP to
Port
Mode 1 Strobed Data Output
Output control signal definitions Mode 1
1 0 1 0 1/0 X X X 1 X X X X 1 0 X
D7 D6 D5 D4 D3 D2 D1 D0 D7 D6 D5 D4 D3 D2 D1 D0
1 - Input
0 - Output
For PC4 – PC5
PC0 INTRB
PC3 INTRA
WR PC4 – PC5 I/O
OBF
INTR
ACK
STB
IBF