---
title: "Modes of operation of 8255"
subject: "Microprocessor"
chapter: 4
key: "semester_4/microprocessor:8255-modes"
source: https://www.bctengineer.com/q/semester_4/microprocessor/8255-modes
site: BCT Engineering
---

# Modes of operation of 8255

Microprocessor · Chapter 4: Microprocessor System

- Asked in: 2075 Baisakh, 6 marks
- Video: [Control Word and Modes of 8255: BSR Mode, IO Modes, and Detailed Mode 0, 1, & 2](https://www.youtube.com/watch?v=la-EoWUcSp4) — Engineering Funda
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_4/microprocessor/8255-modes
- Whole chapter: https://www.bctengineer.com/md/semester_4/microprocessor/chapter-4

## Question

Explain different modes of operation in 8255.

## Short answer

The 8255A operates in Mode 0 (simple I/O without handshake), Mode 1 (strobed I/O with handshake using Port C lines), Mode 2 (bidirectional bus on Port A), and BSR mode (bit set/reset of Port C). Modes are selected by the control word's D7 and D6-D5 bits.

## Answer

The **8255A PPI** has three operating modes for its ports, selected by the control word (D7 = 1), plus a bit set/reset mode.

#### Mode 0 : Simple (basic) I/O
- Ports A, B and C (as two 4-bit halves) work as simple input or output; no handshake.
- Outputs are latched, inputs are not latched.
- Used for LEDs, switches and 7-segment displays. Example: control word `90H` sets Port A as input and Port B, Port C as output.

#### Mode 1 : Strobed (handshake) I/O
- Only Port A and Port B can be used; each acts as an 8-bit I/O port with 3 handshake lines taken from Port C.
- Input port signals: **STB** (strobe from device), **IBF** (input buffer full), **INTR** (interrupt request).
- Output port signals: **OBF** (output buffer full), **ACK** (acknowledge from device), **INTR**.
- Port A uses PC3–PC5 (input) or PC3, PC6, PC7 (output); Port B uses PC0–PC2. Interrupt enable flip-flops INTE are set by BSR.
- Used for keyboards and printers.

#### Mode 2 : Bidirectional bus
- Only Port A; the same 8 lines work as input and output (bidirectional) with handshake signals PC3–PC7 (INTR, OBF, ACK, STB, IBF).
- Port B can then be used in mode 0 or mode 1. Used for two-way transfer with another processor or disk controller.

#### BSR mode (D7 = 0)
Sets or resets a single bit of Port C: D3–D1 select the bit, D0 = 1 sets and D0 = 0 resets.

```text
 I/O mode control word:
 D7 D6 D5 D4 D3 D2 D1 D0
 1  [A mode] PA PCu [B]PB PCl
 D6D5: 00 mode0, 01 mode1, 1x mode2
 D4,D3,D1,D0: 1 = input, 0 = output ; D2: 0 mode0, 1 mode1
```

## Check yourself

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

1. In 8255 Mode 1 (strobed I/O), which ports can be used and where do the handshake lines come from?
   A. Ports A, B and C; handshake lines from Port B
   B. Only Port C; handshake lines from Port A
   C. Ports A and B; three handshake lines each taken from Port C
   D. Only Port A; handshake lines from Port C
   Answer: C. Only Port A and Port B work as 8-bit handshake ports in Mode 1, each using 3 lines of Port C. (Key point: Mode 1 ports)

2. Which statement about Mode 2 is correct?
   A. Only Port A is bidirectional, using PC3-PC7 for handshake
   B. Both Port A and Port B are bidirectional
   C. It is simple I/O without handshake
   D. It sets or resets a single bit of Port C
   Answer: A. Mode 2 is a bidirectional bus on Port A only, with handshake signals on PC3-PC7; Port B can then be in mode 0 or 1. (Key point: Mode 2)

3. How does BSR mode (D7 = 0) work?
   A. It sets the mode of Port A
   B. It makes Port A bidirectional
   C. It selects input or output for Port B
   D. It sets or resets one bit of Port C: D3-D1 select the bit, D0 gives set (1) or reset (0)
   Answer: D. BSR is selected by D7 = 0 and changes one Port C bit at a time. (Key point: BSR mode)

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

## Related in other subjects

- [8255 mode 2 operation with timing diagram](https://www.bctengineer.com/question.md?key=semester_5%2Finstrumentation_ii%3Appi-mode2) — Instrumentation II, chapter 2
- [Modem and its modes of operation](https://www.bctengineer.com/question.md?key=semester_6%2Fcommunication_systems%3Amodem-modes) — Communication Systems, chapter 7
- [Dual processor modes in centralized SPC](https://www.bctengineer.com/question.md?key=semester_8%2Ftelecommunications%3Adual-processor-modes-spc) — Telecommunications, chapter 4, asked 4×
- [LD instruction under addressing modes](https://www.bctengineer.com/question.md?key=semester_5%2Fcomputer_organization_and_architecture%3Ald-addressing-modes) — Computer Organization and Architecture, chapter 2
