The 8255 has a similar function to the Motorola 6820 PIA (Peripheral Interface Adapter) from the Motorola 6800 family, also originally packaged as 40-pin DIL. The 8255 provides 24 I/O pins with four programmable direction bits: one for Port A(7:0) (i.e., all pins in the port), one for Port B(7:0), one for Port C(3:0) and one for Port C(7:4). By contrast, the Motorola and MOS chips provide only 16 I/O pins plus 4 control pins, but the Motorola/MOS chips allow the direction (input or output) of all I/O pins to be individually programmed. Both have configurations that will do a certain amount of automatic handshaking and interrupt generation.
Other comparable microprocessor I/O chips are the 2655 Programmable Peripheral Interface from the Signetics 2650 family, the Z80 PIO, the Western Design Center WDC 65C21 (equivalent to the Motorola 6820/6821), and the MOS Technology 6522 VIA and 6526 CIA which had considerable additional functionality such as timers and shift registers.
The industrial grade version of Intel ID8255A was available for US$17.55 in quantities of 100 and up.4 The available Intel 8255A-5 version was for USD $6.55 in quantities of 100 or more.5 The available 82C55A CMOS version was outsourced to Oki Electronic Industry Co., Ltd.6 The available package from Intel branded 82C55 in 44-pin PLCC of sampling at fourth quarter of 1985.7 In Eastern Europe, equivalent circuits were manufactured as the KR580VV55A in the Soviet Union and as the MHB8255A by Tesla in Czechoslovakia.
The 8255 was widely used in many microcomputer/microcontroller systems and home computers such as the SV-328 and all MSX models. The 8255 was used in the original IBM-PC,8 PC/XT, PC/jr and clones, along with numerous homebuilt computers such as the N8VEM.
The 8255 gives a CPU or digital system access to programmable parallel I/O.9 The 8255 has 24 input/output pins.10 These are divided into three 8-bit ports (A, B, C).11 Port A and port B can be used as 8-bit input/output ports. Port C can be used as an 8-bit input/output port or as two 4-bit input/output ports or to produce handshake signals for ports A and B.
The three ports are further grouped as follows:
Eight data lines (D0–D7) are available (with an 8-bit data buffer) to read/write data into the ports or control register under the status of the ¬ {\displaystyle {\neg }} RD (pin 5) and ¬ {\displaystyle {\neg }} WR (pin 36), which are active-low signals for read and write operations respectively. Address lines A1 and A0 allow to access a data register for each port or a control register, as listed below:
The control signal chip select ¬ {\displaystyle {\neg }} CS (pin 6) is used to enable the 8255 chip. It is an active-low signal, i.e., when ¬ {\displaystyle {\neg }} CS = 0, the 8255 is enabled. The RESET input (pin 35) is connected to the RESET line of system like 8085, 8086, etc., so that when the system is reset, all the ports are initialized as input lines. This is done to prevent 8255 and/or any peripheral connected to it from being destroyed due to mismatch of port direction settings. As an example, consider an input device connected to 8255 at port A. If from the previous operation, port A is initialized as an output port and if 8255 is not reset before using the current configuration, then there is a possibility of damage of either the input device connected or 8255 or both, since both 8255 and the device connected will be sending out data.
The control register (or the control logic, or the command word register) is an 8-bit register used to select the modes of operation and input/output designation of the ports.12
There are two basic operational modes of 8255:
The two modes are selected on the basis of the value present at the D7 bit of the control word register. When D7 = 1, 8255 operates in I/O mode, and when D7 = 0, it operates in the BSR mode.
The Bit Set/Reset (BSR) mode is available on port C only. Each line of port C (PC7 - PC0) can be set or reset by writing a suitable value to the control word register. BSR mode and I/O mode are independent and selection of BSR mode does not affect the operation of other ports in I/O mode.13
Selection of port C pin is determined as follows:
As an example, if it is needed that PC5 be set, then in the control word,
Thus, as per the above values, 0B (Hex) will be loaded into the Control Word Register (CWR).
This mode is selected when D7 bit of the Control Word Register is 1. There are three I/O modes:14
For example, if port B and upper port C have to be initialized as input ports and lower port C and port A as output ports (all in mode 0):
Hence, for the desired operation, the control word register will have to be loaded with "10001010" = 8A (hex).
In this mode, the ports can be used for simple I/O operations without handshaking signals. Port A, port B provide simple I/O operation. The two halves of port C can be either used together as an additional 8-bit port, or they can be used as individual 4-bit ports. Since the two halves of port C are independent, they may be used such that one-half is initialized as an input port while the other half is initialized as an output port.
The input/output features in mode 0 are as follows:
'Latched' means the bits are put into a storage register (array of flip-flops) which holds its output constant even if the inputs change after being latched.
The 8255's outputs are latched to hold the last data written to them. This is required because the data only stays on the bus for one cycle. So, without latching, the outputs would become invalid as soon as the write cycle finishes.
The inputs are not latched because the CPU only has to read their current values, then store the data in a CPU register or memory if it needs to be referenced at a later time. If an input changes while the port is being read then the result may be indeterminate.
When we wish to use port A or port B for handshake (strobed) input or output operation, we initialise that port in mode 1 (port A and port B can be initialised to operate in different modes, i.e., for e.g., port A can operate in mode 0 and port B in mode 1). Some of the pins of port C function as handshake lines.
For port B in this mode (irrespective of whether is acting as an input port or output port), PC0, PC1 and PC2 pins function as handshake lines.
If port A is initialised as mode 1 input port, then, PC3, PC4 and PC5 function as handshake signals. Pins PC6 and PC7 are available for use as input/output lines.
The mode 1 which supports handshaking has following features:
Input Handshaking signals
Output Handshaking signals
Only port A can be initialized in this mode. Port A can be used for bidirectional handshake data transfer. This means that data can be input or output on the same eight lines (PA0 - PA7). Pins PC3 - PC7 are used as handshake lines for port A. The remaining pins of port C (PC0 - PC2) can be used as input/output lines if group B is initialized in mode 0 or as handshaking for port B if group B is initialized in mode 1. In this mode, the 8255 may be used to extend the system bus to a slave microprocessor or to transfer data bytes to and from a floppy disk controller. Acknowledgement and handshaking signals are provided to maintain proper data flow and synchronisation between the data transmitter and receiver.
R Theagarajan (1 January 2004). Microprocessor And Its Applications. New Age International. pp. 165–. ISBN 978-81-224-1040-2. Retrieved 3 June 2012. 978-81-224-1040-2 ↩
Embedded Systems Programming. Miller Freeman Publications. July 1996. p. 256. Retrieved 3 June 2012. https://books.google.com/books?id=oaYrAQAAMAAJ ↩
"Product page for the 82C55A". Renesas Electronics. Retrieved 11 January 2023. https://www.renesas.com/us/en/products/space-harsh-environment/mil-std-883-products/mil-std-883-microprocessors-and-peripherals/82c55a-cmos-programmable-peripheral-interface ↩
Intel Corporation, "Microcomputer Component: New industrial grade product line answers the demand for high-reliability components to operate in industrial applications.", Intel Preview, March/April 1979, Pg. 11 ↩
Intel Corporation, "Intel peripherals enhance 8086 system design", Intel Preview Special Issue: 16-Bit Solution, May/June 1980, Pg. 22 ↩
Intel Corporation, "NewsBit: Intel Licenses Oki on CMOS Version of Several Products", Solutions, July/August 1984, Page 1. ↩
Ashborn, Jim; "Advanced Packaging: A Little Goes A Long Way", Intel Corporation, Solutions, January/February 1986, Page 2 ↩
Robert Jourdain (1986). Programmer's problem solver for the IBM PC, XT, & AT. Brady Communications Co. p. 3. Retrieved 3 June 2012. https://books.google.com/books?id=AdRQAAAAYAAJ ↩
Electronics world. Reed Business Pub. 1996. p. 947. Retrieved 3 June 2012. https://books.google.com/books?id=MF5KAQAAIAAJ ↩
"Intel 82c55 PPI Datasheet" (PDF). http://download.intel.com/design/archives/periphrl/docs/23125604.pdf ↩
"PCI 82C55A Datasheet" (PDF). http://www.sharpmz.no/original/download/82c55a.pdf ↩
Byte. McGraw-Hill. 1981. p. 40. Retrieved 3 June 2012. https://books.google.com/books?id=qYU_AQAAIAAJ ↩
U. S. Shah. "11". Microprocessor & Interfacing Techniques (second ed.). Techmax Publication. pp. 11–5. ISBN 978-81-8492-305-6. 978-81-8492-305-6 ↩
"i8255 introduction" (PDF). http://map.grauw.nl/resources/ppi/chipsi8255.pdf ↩