---
title: "Short note: Programmable Peripheral Interface"
subject: "Microprocessor"
chapter: 4
key: "semester_4/microprocessor:short-note-ppi"
source: https://www.bctengineer.com/q/semester_4/microprocessor/short-note-ppi
site: BCT Engineering
---

# Short note: Programmable Peripheral Interface

Microprocessor · Chapter 4: Microprocessor System

- Asked in: 2073 Magh, 4 marks; 2072 Asoj, 4 marks; 2071 Bhadra, 4 marks; 2070 Magh, 4 marks; 2069 Poush, 4 marks; 2068 Magh, 4 marks (asked 6 times)
- Video: [8255 Programmable Peripheral Interface: Block Diagram and Working Explained](https://www.youtube.com/watch?v=JCAjbuvvXbA) — Engineering Funda
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_4/microprocessor/short-note-ppi
- Whole chapter: https://www.bctengineer.com/md/semester_4/microprocessor/chapter-4

## Question

Write a short note on Programmable Peripheral Interface (PPI).

## Short answer

The Intel 8255A PPI provides 24 programmable I/O lines (Ports A, B, C) with modes 0 (simple I/O), 1 (strobed handshake), 2 (bidirectional on Port A), and BSR mode. It connects peripherals like keyboards and displays to the microprocessor via a control word.

## Answer

The **Programmable Peripheral Interface (PPI)**, Intel **8255A**, is a general-purpose parallel I/O device used to connect the microprocessor with peripherals such as keyboards, displays, switches and LEDs. It is programmable: its function is selected by writing a control word.

**Features**
- 24 I/O lines in three 8-bit ports: **Port A, Port B, Port C** (Port C can be split into upper PC7–PC4 and lower PC3–PC0).
- Two groups: **Group A** (Port A + PC upper) and **Group B** (Port B + PC lower).
- TTL compatible, single +5 V supply, 40-pin DIP.

```text
 D0-D7 <-> [Data bus buffer] <-> Group A <-> PA0-PA7
 RD,WR  -> [Read/Write       ]            <-> PC4-PC7
 A0,A1  -> [control logic    ]  Group B <-> PC0-PC3
 CS,RESET                                <-> PB0-PB7
```

**Port selection** (CS = 0): A1A0 = 00 Port A, 01 Port B, 10 Port C, 11 control register.

**Operating modes**
- **Mode 0:** simple I/O, no handshaking.
- **Mode 1:** strobed I/O with handshake signals (Port C lines) and interrupts.
- **Mode 2:** bidirectional bus on Port A with handshaking.
- **BSR mode:** individual bits of Port C can be set or reset.

**Control word (I/O mode):** D7 = 1; D6D5 group A mode; D4 Port A (1 = input); D3 PC upper (1 = input); D2 group B mode; D1 Port B (1 = input); D0 PC lower (1 = input). Example: `90H` = Port A input, Port B output, Port C output, mode 0.

**Applications:** interfacing keyboards, 7-segment displays, ADC/DAC, printers and stepper motors.

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. What is the 8255A PPI and how many I/O lines does it provide?
   A. A programmable interrupt controller with 8 lines
   B. A programmable parallel I/O device with 24 lines in three 8-bit ports
   C. A serial interface with 16 lines
   D. A DMA controller with 32 lines
   Answer: B. The 8255A is a parallel I/O chip with Port A, Port B and Port C, total 24 lines. (Key point: Identity and lines)

2. With CS = 0, which A1A0 combination selects the control register?
   A. 00
   B. 01
   C. 10
   D. 11
   Answer: D. 00 = Port A, 01 = Port B, 10 = Port C, 11 = control register. (Key point: Port selection)

3. Which mode gives simple I/O without handshaking?
   A. Mode 0
   B. Mode 1
   C. Mode 2
   D. BSR mode
   Answer: A. Mode 0 is basic I/O; Mode 1 is strobed and Mode 2 is bidirectional with handshaking. (Key point: Modes)

4. What does the control word 90H set?
   A. Port A output, Port B input, Port C input
   B. All ports output in mode 1
   C. Port A input, Port B output, Port C output, mode 0
   D. BSR mode with PC0 set
   Answer: C. 90H = 1001 0000: D7=1 I/O mode, D4=1 Port A input, other bits 0 give mode 0 and outputs for B and C. (Key point: Control word)

## Related in other subjects

- [Double handshake data transfer with 8255-PPI](https://www.bctengineer.com/question.md?key=semester_5%2Finstrumentation_ii%3Adouble-handshake-8255) — Instrumentation II, chapter 2
- [8255 at A0A0H: interface and control words](https://www.bctengineer.com/question.md?key=semester_5%2Finstrumentation_ii%3Appi-a0a0h-control-words) — Instrumentation II, chapter 2
- [PCI bus; 8255 printer interface at 5500H](https://www.bctengineer.com/question.md?key=semester_5%2Finstrumentation_ii%3Apci-printer-5500h) — Instrumentation II, chapter 2
- [8-channel ADC interface with 8255 and 8085](https://www.bctengineer.com/question.md?key=semester_5%2Finstrumentation_ii%3Aadc8-8255-problem) — Instrumentation II, chapter 4
