8255 I/O Interfacing

CSC-167 · Semester II · Microprocessor

8255 Programmable I/O

Build the control word and see how each port is configured.

Group A mode

Port A
Port B
Port C lower

Control word

0x82

10000010

Bit 7 = 1 (I/O mode) · Bits 6-5 = Group A mode 0 · Bit 4 = Port A out

Bit 3 = Port C upper out · Bit 2 = Group B mode 0 · Bit 1 = Port B in · Bit 0 = Port C lower out

Software writes the control word to port 0x43 to configure the chip at runtime.