Assignment Title: Programmable Peripheral Interface 8255: American International University-Bangladesh Summer 2019-2020
Assignment Title: Programmable Peripheral Interface 8255: American International University-Bangladesh Summer 2019-2020
Assignment Title: Programmable Peripheral Interface 8255: American International University-Bangladesh Summer 2019-2020
Summer 2019-2020
ID : 18-38385-2
Section : K
Program: BSc CSE
Course : MICROPROCESSOR AND EMBEDDED SYSTEMS
INTRODUCTION:
The 8255A is a general purpose programmable I/O device designed to transfer the data from
I/O to interrupt I/O under certain conditions as required. It can be used with almost any
microprocessor.
It consists of three 8-bit bidirectional I/O ports (24I/O lines) which can be configured as per
the requirement.
Ports of 8255A:
8255A has three ports, i.e., PORT A, PORT B, and PORT C.
Port A contains one 8-bit output latch/buffer and one 8-bit input buffer.
Port B is similar to PORT A.
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, i.e. the first mode is named as mode 0, the second mode is named
as Mode 1 and the third mode is named as Mode 2.
OPERATING MODES:
8255A has three different operating modes:
Mode 0 − in this mode, Port A and B is used as two 8-bit ports and Port C as two 4-bit
ports. 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.
Mode 1 − in this mode, Port A and B is used as 8-bit I/O ports. They can be configured
as either input or output ports. Each port uses three lines from port C as handshake
signals. Inputs and outputs are latched.
Mode 2 − in this mode, Port A can be configured as the bidirectional port and Port B
either in Mode 0 or Mode 1. 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.
FEATURES OF 8255A:
The prominent features of 8255A are as follows −
It consists of 3 8-bit IO ports i.e. PA, PB, and PC.
Address/data bus must be externally demux'd.
It is TTL compatible.
It has improved DC driving capability.
8255 ARCHITECTURE:
The following figure shows the architecture of 8255A −>
It consists of 40 pins and operates in +5V regulated power supply. Port C is further divided into
two 4-bit ports i.e. port C lower and port C upper and port C can work in either BSR (bit set
rest) mode or in mode 0 of input-output mode of 8255. Port B can work in either mode or in
mode 1 of input-output mode. Port A can work either in mode 0, mode 1 or mode 2 of input-
output mode.
It has two control groups, control group A and control group B. Control group A consist of port
A and port C upper. Control group B consists of port C lower and port B.
Depending upon the value if CS’, A1 and A0 we can select different ports in different modes as
input-output function or BSR. This is done by writing a suitable word in control register (control
word D0-D7).
PIN DIAGRAM:
0 0 0 PORT A 80 H
0 0 1 PORT B 81 H
0 1 0 PORT C 82 H
0 1 1 Control Register 83 H
1 X X No Selection X
WR:
It stands for write. This control signal enables the write operation. When this signal goes low,
the microprocessor writes into a selected I/O port or control register.
RESET:
This is an active high signal. It clears the control register and sets all ports in the input mode.
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.
A1 A0 RD WR CS Result
0 0 0 1 0 Input Operation
PORT A → Data Bus
OPERATING MODES:
2. Input-Output mode:
If MSB of control word (D7) is 1, PPI works in input-output mode. This is further divided
into three modes:
Mode 0: In this mode all the three ports (port A, B, C) can work as simple input function
or simple output function. In this mode there is no interrupt handling capacity.
Mode 1: Handshake I/O mode or strobed I/O mode. In this mode either port A or port B
can work as simple input port or simple output port, and port C bits are used for
handshake signals before actual data transmission. It has interrupt handling capacity and
input and output are latched.
Example: A CPU wants to transfer data to a printer. In this case since speed of processor
is very fast as compared to relatively slow printer, so before actual data transfer it will
send handshake signals to the printer for synchronization of the speed of the CPU and
the peripherals.
Mode 2: Bi-directional data bus mode. In this mode only port A works, and port B can
work either in mode 0 or mode 1. 6 bits port C are used as handshake signals. It also
has interrupt handling capacity.
CONCLUSION:
The 8255A programmable peripheral interface (PPI) implements general-purpose I/O interface
to connect peripheral equipment to a microcomputer system bus. The core's functional. We
can designed it by VHDL code and input signal for PPI 8255, which is generated by VHDL code.
Simulated result is varied for three 8-bit Peripheral Ports- Ports A, B, and C, three programming
modes for Peripheral Ports: Mode 0 (Basic Input/Output), Mode 1 (Strobed Input/Output), and
Mode 2 (Bidirectional), total of 24 programmable I/O lines .Also varied simulated and
synthesized result for PPI8255.
As the application of microprocessors in our technology intensive environment increases, so
we need professionals who are able to utilize, control, interconnect, and troubleshoot
computers.