Programmable Devices with
Handshake Signals
Data Input with HandshakeMPU
Programmable
Interfacing
Device
Peripheral
Such as
KeyboardRD
STB (Strobe)
IBF
INTR
Data Output with HandshakeMPU
Programmable
Interfacing
Device
Peripheral
Such as
PrinterWR ACK
OBF
INTR
PROGRAMMABLE PERIPHERAL
INTERFACE – 8255
8255
• Programmable parallel I/O device
• Can be programmed to transfer data in
various schemes from simple I/O to INTR I/O
• Has 24 I/O pins grouped into 3 ports, PORT A,
PORT B and PORT C
– Port C is used as either individual bits or in two 4-
bit ports : CUPPER and CLOWER
Block Diagram
• Address (A0-A1):This is used to select the ports
CS A1 A0 Select
0 0 0 PA
0 0 1 PB
0 1 0 PC
0 1 1
Control
reg.
1 X X
8255 Is not
selected
Modes of 8255
1. The Bit Set/Reset (BSR)mode
– Set or Reset bits of Port C
2. I/O mode
1. Mode 0 – Simple I/O mode
2. Mode 1 – I/O with Handshake
3. Mode 2 – Bidirectional Data transfer for Port A
BSR (Bit Set/Reset) Mode
BSR Control Word
Mode 0 : Simple Input or Output
• In this mode, ports A and B are used as two
simple 8 bit ports and port C as two 4 bit ports
• Each port can be programmed to function as
simply an input port or an output port.
• The input/output features in Mode 0 are
– Output ports are latched
– Input ports are not latched
Mode 1: Input or Output with
handshake
• Two ports (A and B) function as 8 bit I/O ports
They can be configured either as input or
output ports
• Each port uses three lines from port C as
handshake signals. The remaining two lines of
port C can be used for simple I/O functions
• Input and output data are latched
• Interrupt logic is supported
Mode 1: Input Control Signals
• Ports A and B are configured as input ports
• Port A uses the upper three signals PC3 ,PC4
and PC5 as handshake signals
• Port B uses the lower three signals PC2, PC1
and PC0 as handshake signals
• STB
• IBF
• INTR
• INTE
Mode 1: Output Control Signals
• OBF
• ACK
• INTR
• INTE
Mode 2: Bidirectional Data Transfer
• The single 8-bit port in group A is available
• This 8-bit port is bidirectional
• The 5-bit control port C (PC3-PC7) is used for
generating / accepting handshake signals
• Inputs and outputs are both latched
8255 Programmable parallel I/O

8255 Programmable parallel I/O

  • 1.
  • 2.
    Data Input withHandshakeMPU Programmable Interfacing Device Peripheral Such as KeyboardRD STB (Strobe) IBF INTR
  • 3.
    Data Output withHandshakeMPU Programmable Interfacing Device Peripheral Such as PrinterWR ACK OBF INTR
  • 4.
  • 5.
    8255 • Programmable parallelI/O device • Can be programmed to transfer data in various schemes from simple I/O to INTR I/O • Has 24 I/O pins grouped into 3 ports, PORT A, PORT B and PORT C – Port C is used as either individual bits or in two 4- bit ports : CUPPER and CLOWER
  • 6.
  • 7.
    • Address (A0-A1):Thisis used to select the ports CS A1 A0 Select 0 0 0 PA 0 0 1 PB 0 1 0 PC 0 1 1 Control reg. 1 X X 8255 Is not selected
  • 8.
    Modes of 8255 1.The Bit Set/Reset (BSR)mode – Set or Reset bits of Port C 2. I/O mode 1. Mode 0 – Simple I/O mode 2. Mode 1 – I/O with Handshake 3. Mode 2 – Bidirectional Data transfer for Port A
  • 11.
    BSR (Bit Set/Reset)Mode BSR Control Word
  • 12.
    Mode 0 :Simple Input or Output • In this mode, ports A and B are used as two simple 8 bit ports and port C as two 4 bit ports • Each port can be programmed to function as simply an input port or an output port. • The input/output features in Mode 0 are – Output ports are latched – Input ports are not latched
  • 13.
    Mode 1: Inputor Output with handshake • Two ports (A and B) function as 8 bit I/O ports They can be configured either as input or output ports • Each port uses three lines from port C as handshake signals. The remaining two lines of port C can be used for simple I/O functions • Input and output data are latched • Interrupt logic is supported
  • 14.
    Mode 1: InputControl Signals • Ports A and B are configured as input ports • Port A uses the upper three signals PC3 ,PC4 and PC5 as handshake signals • Port B uses the lower three signals PC2, PC1 and PC0 as handshake signals • STB • IBF • INTR • INTE
  • 16.
    Mode 1: OutputControl Signals • OBF • ACK • INTR • INTE
  • 18.
    Mode 2: BidirectionalData Transfer • The single 8-bit port in group A is available • This 8-bit port is bidirectional • The 5-bit control port C (PC3-PC7) is used for generating / accepting handshake signals • Inputs and outputs are both latched