8255
8255
PERIPHERAL INTERFACE
-8255
UNIT - III
FEATURES
• It is an I/O port chip used for interfacing
I/O devices with microprocessor system.
• It is device used to implement parallel
data transfer between processor and slow
peripheral devices like ADC, DAC,
keyboard, 7-segment display, lCD etc.
• It has 24 I/O programmable pins.
• 8255A has three ports
• PORT A
• PORT B
• PORT C
• Port A and Port B are 8 bit parallel ports.
• Port C can be split into two parts, i.e. PORT C lower (PC0-
PC3) and PORT C upper (PC7-PC4) by the control word
• These three ports are further divided into two groups,
– i.e. Group A includes PORT A and upper PORT C.
– Group B includes PORT B and lower PORT C
• These two groups can be programmed in three different
modes.
OPERATING MODES OF 8255
A1 A0 Select
0 0 PA
0 1 PB
1 0 PC
Control
1 1
reg.
• RESET: This is used to reset the device.
That means clear control registers.
• PB0-PB7:Similar to PA
X X X BIT SET/RESET
1=SET
0=RESET
Don’t care
Bit select
0 1 2 3 4 5 6 7
0 1 0 1 0 1 0 1
B0 0 0 1 1 0 0 1 1
0 0 0 0 1 1 1 1
B1
BIT SET/RESET FLAG
=0 Active
B2
• PC0-PC7 is set or reset as per the status
of D0.
• A BSR word is written for each bit
• Example:
– PC3 is Set then control register will be
0XXX0111.
– PC4 is Reset then control register will be
0XXX01000.
• X is a don’t care.
FORMAT OF I/O MODE:
The mode format for I/O as shown in figure
D D D D D D D D
7 6 5 4 3 2 1 0
Group A Group B
Port C Upper
1=Input Port C Lower
Mode set
0=Output 1=Input
1-I/O mode
0-BSR mode Port B 0=Output
1=Input Port B
0=Output 1=Input
Mode 0=Output
selection Mode selection
00=mode 0 0=mode 0
01=mode 1 1=mode 1
1x=mode 2
• The control word for both mode is
same.
• Bit D7 is used for specifying whether
word loaded in to Bit set/reset mode
or Mode definition word.
• D7=1=Mode definition mode.
• D7=0=Bit set/Reset mode.