Académique Documents
Professionnel Documents
Culture Documents
Interfacing devices
8255 Programmable peripheral
Interface(PPI)
• 8255 is a popularly used parallel,
programmable input-output device.
• It can be used to transfer data under various
condition from simple input-output to
interrupt input-output.
• This is economical, functional, flexible but is a
little complex and general purpose i/o device
that can be used with almost any
microprocessor.
Features of 8255A
CS A1 A0 Result
0 0 0 PORT A
0 0 1 PORT B
0 1 0 PORT C
0 1 1 Control
Register
1 X X No Selection
8255 Architecture
• WR
– It stands for write. This control signal enables the
write operation.
– When this signal goes low, the microprocessor writes
data into a selected I/O port or control register.
– This input pin enables the CPU to write data or control
words into the 8255.
• RESET
– This is an active high signal.
– It clears the control register and sets all ports in the
input mode.
8255 Architecture
• RD
– It stands for Read.
– This control signal enables the Read operation.
– When the signal is low, the microprocessor reads the data
from the selected I/O port of the 8255.
– This input pin enables 8255 to send the data or status
information to the CPU on the data bus.
• A0 and A1
– These input signals work with RD, WR, and one of the
control signal.
– Following is the table showing their various signals with
their result.
8255 Architecture
A1 A0 RD WR CS Result
Input Operation
PORT A → Data Bus
0 0 0 1 0
Output Operation
Data Bus → PORT A
0 0 1 0 0
– Mode 0
• In this mode, Port A and B is used as two 8-bit ports
and Port C as two 4-bit ports.
• In this mode all three ports (PA, PB, PC) can work as
simple input function or output function.
• Each port can be programmed in either input mode or
output mode where outputs are latched and inputs are
not latched.
• Ports do not have interrupt capability.
Operating Modes
Interrupt
Comm. input
with from external
CPU devices
Control Cascade
signals for multiple
8259A setup
Interrupt controller
• INT generated by 8259 is connected to INTR
of 8086
• INT =1 when 8259 receives a valid interrupt
request
• INTA produced by the microprocessor
consists of two pulse and it signals the 8259
to put the interrupt type number on the
data bus
Interfacing the 8259A to 8086
Cascading
Using master
Slave connection
This is a PAL
From the CPU’s point of
View, the 8259 is also a
I/O device!!!!