8255A-5 programmable peripheral interface pinout

DIP-40. Three 8-bit programmable I/O ports (A, B, C).

Three 8-bit ports whose directions are set by a control word; what each port bit does depends on the machine. IBM PC 5150, XT 5160 and Portable 5155 (U36 on the 5150): ports $60 to $63, A and C in and B out (mode word $99). PA0-PA7 read the keyboard scan code (5150: switches SW1-1 to SW1-8 while PB7 is HIGH). PB0 gates timer 2; PB1 HIGH passes timer 2 to the speaker; PB2 picks the SW2 switches port C reads (5150; spare on the 5160); PB3 HIGH turns the cassette motor off (5150) or picks the high or low SW1 nibble (5160); PB4 LOW enables the RAM parity check; PB5 LOW enables the I/O channel check; PB6 LOW holds the keyboard clock LOW; PB7 HIGH clears the keyboard (5150: also puts SW1 on port A). PC0-PC3 read SW2 switches 1-4 (5150; PC0 reads SW2-5 when PB2 selects it) or SW1 switches 1-4 or 5-8 chosen by PB3 (5160); PC4 is cassette data in (5150; spare on the 5160); PC5 timer 2 output; PC6 the I/O channel check flag; PC7 the RAM parity check flag (HIGH = error). Amstrad CPC 464, 664 and 6128 (IC107): port A is the AY-3-8912 data bus; ports B and C carry the keyboard, cassette and sound-chip control (CPC6128 service manual, CPU circuit diagram). MSX (I/O $A8-$AB): port A selects the primary slots; port C bit 4 is the cassette motor and bit 5 cassette out. PCjr (ZM22): same ports, different bits. PA0-PA7 are an output that only stores keystrokes for PC compatibility. PB0 gates timer 2; PB1 speaker data (0 forces the timer 2 output to 0); PB2 HIGH for alphanumeric modes, LOW for graphics; PB3 HIGH turns the cassette motor off; PB4 HIGH disables the internal beeper and the cassette motor relay; PB6 and PB5 pick the sound source to the RF modulator and audio jack (00 timer 2, 01 cassette audio in, 10 I/O channel audio, 11 SN76496); PB7 reserved. PC0 keyboard latched (a key was pressed while NMI was off); PC1 LOW = internal modem fitted; PC2 LOW = diskette card fitted; PC3 LOW = 64KB Memory and Display Expansion fitted; PC4 cassette data in; PC5 timer 2 output; PC6 keyboard data (cable or IR receiver); PC7 LOW = keyboard cable connected.

Open the interactive 8255A pinout

Pins

PinNameTypeSignal
1PA3ioPort A bit 3.
2PA2ioPort A bit 2.
3PA1ioPort A bit 1.
4PA0ioPort A bit 0.
5/RDctrlRead strobe, active LOW.
6/CSctrlChip select, active LOW.
7GNDgroundGround.
8A1addrAddress bit 1. With A0 selects port A, B, C or the control word.
9A0addrAddress bit 0.
10PC7ioPort C bit 7.
11PC6ioPort C bit 6.
12PC5ioPort C bit 5.
13PC4ioPort C bit 4.
14PC0ioPort C bit 0.
15PC1ioPort C bit 1.
16PC2ioPort C bit 2.
17PC3ioPort C bit 3.
18PB0ioPort B bit 0.
19PB1ioPort B bit 1.
20PB2ioPort B bit 2.
21PB3ioPort B bit 3.
22PB4ioPort B bit 4.
23PB5ioPort B bit 5.
24PB6ioPort B bit 6.
25PB7ioPort B bit 7.
26VCCpower+5 V supply.
27D7dataData bus bit 7.
28D6dataData bus bit 6.
29D5dataData bus bit 5.
30D4dataData bus bit 4.
31D3dataData bus bit 3.
32D2dataData bus bit 2.
33D1dataData bus bit 1.
34D0dataData bus bit 0.
35RESETctrlReset, active HIGH. Clears the control register and sets all ports to input.
36/WRctrlWrite strobe, active LOW.
37PA7ioPort A bit 7.
38PA6ioPort A bit 6.
39PA5ioPort A bit 5.
40PA4ioPort A bit 4.

Fitted in

Sources