Presentation
On
PPI 8255
Md. Rasheduzzaman
Id: 16CSE027
Session: 2016-17
PPI 8255
PPI – Programmable Peripheral Interface
It is an I/O port chip used for interfacing I/O
devices with microprocessor
Very commonly used peripheral chip
2
PPI 8255
Features:
It is a programmable device.
It has 24 I/O programmable pins like PA,PB,PC (3-8 pins).
T T L compatible.
Improved dc driving capability
It has three separately accessible ports.
Block Diagram of 8255
Pin Diagram of 8255
Data bus(D0-D7):These are 8-bit bi-directional buses,
connected to 8085 data bus for transferring data.
CS This is Active Low signal. When it is low, then data is
transfer from 8085.
Read: This is Active Low signal, when it is Low read
operation will be start.
Write: This is Active Low signal, when it is Low Write
operation will be start.
Pin Diagram of 8255 (cont.)
Address (A0-A1):This is used to select the ports.
like this
A1 A0 Select
0 0 PA
0 1 PB
1 0 PC
Control
1 1
reg.
Pin Diagram of 8255 (cont.)
PA0-PA7:It is the 8-bit bi-directional I/O pins used
to send the data to peripheral or to receive the
data from peripheral
.
PB0-PB7:Similar to
PA
PC0-PC7:This is also 8-bit bidirectional I/O pins.
These lines are divided into two groups.
PC0 to PC3(Lower Groups)
PC4 to PC7 (Higher groups)
These two groups working in separately using 4
data’s.
Input (Read) Cycle
RD’ WR’ CS’ A1 A2 Input Read
Cycle
0 1 0 0 0 Port A to Data
Bus
0 1 0 0 1 PORT B to Data
Bus
0 1 0 1 0 PORT C to Data
Bus
0 1 0 1 1 CWR to Data
Bus
Output (Write) Cycle
RD’ WR’ CS’ A1 A2 Input Read
Cycle
1 0 0 0 0 Data Bus
To Port A
1 0 0 0 1 Data Bus
To Port B
1 0 0 1 0 Data Bus
To Port C
1 0 0 1 1 Data Bus to
CWR
8255 Programmable Peripheral Interface
What is the addresses of port A, port B, port C
of the 82C55A device?
To access port A, A1A0 = 00, A15 = A14 = 1, A13 =
A12 = … = A2 = 0, which gives the port A
address as
1100 0000 0000 00002 = C00016
Similarly, it can be determined that the address
of port B equals C00116, that of port C is C00216,
and the address of the control register is
C00316.
8 2 5 5 –PPI Modes o f O p e r a t i o n
Modes
BSR
I/O MODE
BIT SET-REST
MODE 2
MODE 0 MODE 1
Strobed Bidirectional
Basic I/O Mode Strobed I/O Mode
I/O
Modes o f 8255 PPI
Port A, Port B and Port C can work in Mode 0
Port A and Port B can work in Mode 1
Only Port A can work in Mode 2
18
Modes o f 8255 PPI
Mode 0: Simple Input or Output
.
1. Outputs are latched.
2. Inputs are not latched.
3. Ports don’t have handshake or interrupt capability.
13
Modes o f 8255 PPI
Mode 1: Input or Output with Handshake
1. Two ports (A and B) function as 8-bit I/O ports.
They can be configured as either as input or output
ports.
2.Input and Output data are latched.
3. Interrupt logic is supported.
14
Modes o f 8255 PPI
Mode 2: Bidirectional Data Transfer
Port A uses five signals from Port C
as handshake signals for data transfer.
The remaining three signals from port C can be used
either as simple I/O or as handshake for port B.
15
Thank you
16