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 pinoutPins
| Pin | Name | Type | Signal |
|---|---|---|---|
| 1 | PA3 | io | Port A bit 3. |
| 2 | PA2 | io | Port A bit 2. |
| 3 | PA1 | io | Port A bit 1. |
| 4 | PA0 | io | Port A bit 0. |
| 5 | /RD | ctrl | Read strobe, active LOW. |
| 6 | /CS | ctrl | Chip select, active LOW. |
| 7 | GND | ground | Ground. |
| 8 | A1 | addr | Address bit 1. With A0 selects port A, B, C or the control word. |
| 9 | A0 | addr | Address bit 0. |
| 10 | PC7 | io | Port C bit 7. |
| 11 | PC6 | io | Port C bit 6. |
| 12 | PC5 | io | Port C bit 5. |
| 13 | PC4 | io | Port C bit 4. |
| 14 | PC0 | io | Port C bit 0. |
| 15 | PC1 | io | Port C bit 1. |
| 16 | PC2 | io | Port C bit 2. |
| 17 | PC3 | io | Port C bit 3. |
| 18 | PB0 | io | Port B bit 0. |
| 19 | PB1 | io | Port B bit 1. |
| 20 | PB2 | io | Port B bit 2. |
| 21 | PB3 | io | Port B bit 3. |
| 22 | PB4 | io | Port B bit 4. |
| 23 | PB5 | io | Port B bit 5. |
| 24 | PB6 | io | Port B bit 6. |
| 25 | PB7 | io | Port B bit 7. |
| 26 | VCC | power | +5 V supply. |
| 27 | D7 | data | Data bus bit 7. |
| 28 | D6 | data | Data bus bit 6. |
| 29 | D5 | data | Data bus bit 5. |
| 30 | D4 | data | Data bus bit 4. |
| 31 | D3 | data | Data bus bit 3. |
| 32 | D2 | data | Data bus bit 2. |
| 33 | D1 | data | Data bus bit 1. |
| 34 | D0 | data | Data bus bit 0. |
| 35 | RESET | ctrl | Reset, active HIGH. Clears the control register and sets all ports to input. |
| 36 | /WR | ctrl | Write strobe, active LOW. |
| 37 | PA7 | io | Port A bit 7. |
| 38 | PA6 | io | Port A bit 6. |
| 39 | PA5 | io | Port A bit 5. |
| 40 | PA4 | io | Port A bit 4. |
Fitted in
- IBM PC 5150 U36
- IBM XT 5160
- IBM Portable 5155
- IBM PCjr 4860 ZM22
- Amstrad CPC 464 IC107 (M5L8255AP-5; TMP8255AP later)
- Amstrad CPC 664 IC107 (M5L8255AP-5)
- Amstrad CPC 6128 IC107 (M5L8255AP-5)
- MSX1 (generic) Varies by maker; 8255 at I/O $A8-$AB (or inside an MSX-Engine on late boards)
- MSX2 (generic) Discrete 8255 on early MSX2; inside the S3527 or S1985 on most
Sources
- Intel 8255A/8255A-5 data sheet, 1983 Microprocessors and Peripherals Handbook p. 6-166
- IBM PC Technical Reference (Apr 1983), 8255A I/O bit map, p. 1-12
- IBM PC XT Technical Reference (Apr 1984), 8255A I/O bit map, p. 1-26
- PCjr Technical Reference (Nov 1983), 8255 bit assignments and description, pp. 2-30 to 2-34
- PCjr Technical Reference (Nov 1983), system board logic diagram sheet 9 (8255A-5 at ZM22, 8253-5 at ZM23), p. B-11