Programmable Peripheral Interface device
Programmable Peripheral Interface device
• Control Register: Configures ports (A, B, C) as input/output and operational modes via
control word written by the microprocessor.
• I/O Ports: Three 8-bit ports:
Port A: Input/output.
Port B: Input/output.
Port C: 8-bit or two 4-bit ports, also handles handshake signals.
• Chip Select Logic: Enables selection of the 8255A from multiple peripherals using chip
select signal (CS) and address lines.
• Bidirectional Data Bus: 8-bit bus for data transfer between the microprocessor and I/O
devices.
• Control Logic: Manages data flow and configuration based on control word and port
mode.
• Handshake/Interrupt Signals: Provides synchronization using STB, ACK, and INTR
signals in modes 1 and 2 for data transfer.
Introduction to 8255A
• The 8255A programmable peripheral interface (PPI) implements a general purpose I/O
interface
• Connects peripheral equipment to a microcomputer system bus.
• External logic is not required to interface peripheral devices.
Pin diagram:
Block Diagram:
Description:
• Two other signals are RESET and 𝐶𝑆′ (Chip Select) inputs. It enables interface circuitry
for read/write operations. It is inactive low mode and requires 0 for operation. RESET is
used to initiate the device.
• The block diagram totally represents 24 I/O ports or 3 byte wide I/O ports known as port
A, port B and port C.
• Operating characteristics is under software control and it contains 8 bit internal register
(Control register) for the purpose.
• It has 8 bit bidirectional data bus.
• Vcc and GND switches are used for power supply.
• It has three operating mode: mode 0, mode 1 and mode 2.
Here,
Port A7 A6 A5 A4 A3 A2 A1 A0 Address
Port A 1 0 0 0 0 0 0 0 80H
Port B 1 0 0 0 0 0 0 1 81H
Port C 1 0 0 0 0 0 1 0 82H
Control 1 0 0 0 0 0 1 1 83H
Register
Modes of Operation:
Example-1:
Solution:
Control word:
D7 D6 D5 D4 D3 D2 D1 D0
1 0 0 1 0 0 0 0
Instruction:
MOV AL,90 H
OUT 83h, AL
Example-2:
Solution:
Control word:
D7 D6 D5 D4 D3 D2 D1 D0
1 0 1 1 0 0 0 1
Hence, the control word is B1H
Instruction:
MOV AL,0B1H
OUT 83h, AL
Example-3: Write down the mode and I/O configuration for port A, B and C of 8255 after its
control register is loaded with 82H.
Solution:
D7 D6 D5 D4 D3 D2 D1 D0
1 0 0 0 0 0 1 0
0 0 0 PC0
0 0 1 PC1
0 1 0 PC2
0 1 1 PC3
1 0 0 PC4
1 0 1 PC5
1 1 0 PC6
1 1 1 PC7
Example-1:
Solution:
D7 D6 D5 D4 D3 D2 D1 D0
0 0 0 0 1 0 1 1
Here, the control word is= 0BH
Instruction:
OUT 83, AL