ch5
ch5
Set by :
Molla K..
Chapter-5
Programmable Interface Devices
Programmable Interface Devices
A programmable peripheral interface is a multiport device.
The ports may be programmed in a variety of ways as
required by the programmer.
The device is very useful for interfacing peripheral devices.
Interface is the path for communication between two components.
Two types of Interfacing :
o Memory Interfacing and
o I/O Interfacing.
When we are executing any instruction, we need the microprocessor to
access the memory for reading instruction codes and the data stored in
the memory.
Programmable Interface Devices
Interfacing enables the transfer of data between different
devices and a computer.
This function includes the transmission of digital data, analog
signals, or a combination of both.
PORT C
o Port C can be split into two parts, i.e. PORT C lower (PC0_PC3) and PORT C upper
o Features
Outputs are latched , Inputs are buffered not latched.
Ports do not have Handshake or interrupt capability.
To increase the capacity of I/O interface.
It is designed to work with various CPUs like 8085, 8086.
8255 has three 8- bit bidirectional IO ports.
BIT SET/RESET Mode
o This is bit set/reset control word format.
o The PORT C can be Set or Reset by sending OUT instruction to the
CONTROL registers.
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.
I/O Modes
MODE 0(Simple IO ): In this mode , port A, port B and port C is used
as individually (Simply).
0 0 PA
0 1 PB
1 0 PC
1 1 Control reg.
Con’t
o RESET: This is used to reset the device. That means clear control
registers.
oPA0-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.
o PB0-PB7:Similar to PA
o 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)
o These two groups working in separately using 4 data’s.
Block Diagram-8255
Functions
Data Bus Buffer: It has bidirectional data bus D0-D7
D0-D7 is interfaced with system data bus of CPU.
Read Write Control Logic Block: It has different terminal.
8255 read and write data as per control signal RD and WR connected with
microprocessor.
RESET will reset 8255.
A1 and A0 used to select port and control word.
CS is used to select chip of 8255.
Group A and Group B Control
Group A Control is used to control PORT A [PA0-PA7] and upper PORT
C[PC7-PC4] .
Group B Control is used to control PORT B [PB0-PB7] and Lower PORT
C[PC3-PC0] .
It takes control signals from control word and forwards it on respective
ports.