8255 Microprocessor : Architecture, Working & Its Applications

Actually connecting I/O devices with the data bus of the processor is not possible directly. So in its place, there must be some device to which I/O ports must be there for connecting I/O devices like 8255 microprocessor. This processor is from the Family of MCS-85 which Intel designed and it can be used with an 8086 & 8085 microprocessor. The 8255 is a Programmable peripheral interface device that is used to achieve the basic communication method between the microprocessor & machines. It is a peripheral device used for a machine that is programmed to perform as an interface. This 8255 PPI is an interface between the microprocessors and the I/O devices. This article discusses an overview of an 8255 Microprocessor – working with applications.

What is an 8255 Microprocessor?

8255 microprocessor is a very popularly used programmable peripheral interface chip or PPI chip. The function of the 8255 microprocessor is to transmit data in various conditions from simple I/O to interrupt I/O. This microprocessor is also designed for interfacing the CPU with its external world like ADC, keyboard, DAC, etc. This microprocessor is economical, functional, and flexible although is a little complex, so it can be used with any microprocessor. This microprocessor is used to connect peripheral devices & also for interfacing. So this peripheral device is also called an I/O device because the I/O ports of this microprocessor are used for connecting I/O devices. This processor includes three 8-bit bidirectional I/O ports which can be configured based on necessity.

8255 Microprocessor
8255 Microprocessor


The features of the 8255 microprocessor include the following.

  • The 8255 microprocessor is a PPI (programmable peripheral interface) device.
  • It includes three I/O ports which are programmed within different modes.
  • This microprocessor simply provides several facilities to connect different devices. Thus it is used in different applications frequently.
  • It operates in three modes like Mode 0 (Simple I/O), Mode 1 (Strobed I/O), and Mode 2 (Strobed bi-directional I/O).
  • It is compatible totally with the families of Intel microprocessors.
  • It is TTL compatible.
  • For port-C of this microprocessor, direct bit SET/RESET capacity is available.
  • It includes 24 programmable input/output pins which are placed as 2 to 8-bit ports & 2 to 4-bit ports.
  • It includes three 8-bit ports; Port-A, Port-B & Port-C.
  • The three I/O ports include a control register that defines each I/O port’s function & in which mode they must operate.

8255 Microprocessor Pin configuration

The pin diagram of the 8255 microprocessor is shown below. This microprocessor includes 40-pins like PA7-PA0, PC7-PC0, PC3-PC0, PB0-PB7, RD, WR, CS, A1 & A0,D0-D7 and RESET. These pins are discussed below.

Pin Diagram
 Pin configuration 8255

PA7 to PA0 (PortA Pins)

The PA7 to PA0 are Port A data lines pins (1 to 4 & 37 to 40) which are distributed equally on two sides of the top of the microprocessor. These eight port A pins work as either buffered input lines or latched output based on the loaded control word into the control word register.

PB0 to PB7 (Port B Pins)

The PB0 to PB7 from 18 to 25 are the data line pins that carry the port B data.

PC0 to PC7 (Port C Pins)

PC0 to PC7 pins are port C pins which include pin10 to pin17 which carry the port A data bits. From there, pins 10 – pin13 are known as Port C upper pins & pin14 to pin17 are known as lower pins. The pins from these two sections can be used individually to transmit 4 data bits using two separate port C parts.

D0 to D7 (Data bus pins)

These D0 to D7 pins are data I/O lines which include 27-pin to 34-pin. These pins are used to carry the 8-bit binary code and it is utilized to train the entire IC work. These pins are jointly known as the control register/control word which carries the data of the control word.

A0 & A1

A0 and A1 pins at pin8 & pin9 simply make a decision about which port will be preferred for transmitting the data.

If A0 = 0 & A1=0 then Port-A is selected.
If A0 = 0 & A1=1 then Port-B is selected.
If A0 = 1 & A1=0 then Port-C is selected.
If A0 = 1 & A1=1 then the control register is selected.


The pin6 like CS’ is a chip select input pin which is responsible for selecting a chip. A low signal at CS’ pin simply allows the communication between the 8255 & the processor which means at this pin, the operation of data transfer gets allowed by an active low signal.


The pin5 like RD’ is a read input pin that puts the chip within the reading mode. A low signal at this RD’s pin provides data to the CPU by a data buffer.


The pin36 like WR’ pin is a write input pin that puts the chip within writing mode. So, a low signal at WR’ pin simply allows the CPU to execute the write operation above the ports otherwise microprocessor’s control register through the data bus buffer.


The pin35 like the RESET pin resets the whole data available in all the keys to their default values when it is in set mode. It is an active high signal where the high signal at the RESET pin clears the control registers &the ports are placed within the input mode.


The pin7 is a GND pin of IC.


The pin26 like VCC is the 5V input pin of IC.

8255 Microprocessor Architecture

The architecture of the 8255 microprocessor is shown below.

8255 Architecture

                                                                                                                                  8255 Architecture

Data Bus Buffer:

The data bus buffer is mainly used for connecting the inside bus of the microprocessor with the system bus so that proper interfacing can be established between these two. This buffer simply permits the read or write operation to be executed from or to the CPU. This buffer permits the data supplied from the control register or ports to the CPU in case of write operation & from the CPU to the status register or ports in case of the read operation.

Read/Write Control Logic:

Read or write control logic unit controls the inside system operations. This unit holds the capability to manage both the data transfer & status or control words internally & externally. Once there needs data to fetch then it allows the provided address by the 8255 by the bus & generates a command immediately to the two control groups for the specific operation.

Group A & Group B Control:

Both these groups are managed by the CPU and work based on the generated command by the CPU. This CPU transmits control words toward these two groups and they consecutively transmit the suitable command to their particular port. Group A controls port A with higher order port C bits whereas group B controls port B with lower order port C bits.

Port A & Port B

Port A & Port B includes an 8-bit input latch and 8-bit buffered or latched output. The main function of these ports is also independent of the mode of operation. Port A can be programmed in 3 modes like modes 0, 1, and 2 whereas Port B can be programmed in modes 0 & mode 1.

Port C

Port C includes an 8-bit data input buffer and 8-bit bidirectional data o/p latch or buffer. This port is divided mainly into two sections – port C upper PCU & port C lower PC. So these two sections are mainly programmed & separately used as a 4-bit I/O port. This port is used for handshake signals, Simple I/O & status signal inputs. This port is used in combination with port A & Port B for both the status and handshaking signals. This port provides only direct but sets or resets capacity.

8255 Microprocessor Operating Modes

The 8255 microprocessor has two operating modes like bit set-reset mode and input/output mode which are discussed below.

Bit Set-Reset Mode

Bit set-reset mode is mainly utilized to set/reset only the Port-C bits. In this type of operating mode, it only affects a time one bit of Port C. Once the user sets the bit, then it stays set until it will unset by the user. The user requires loading the bit pattern within the control register to modify the bit. Once port C is used for status/ control operation, then by sending an OUT instruction, every individual port C bit can be set/reset.

I/O Mode

I/O mode has three different modes like Mode 0, Mode 1 & Mode 2 where each mode is discussed below.

Mode 0:

This is an I/O mode of 8255 which simply allows the programming of each port like either i/p or o/p port. So, the I/O feature of this mode simply includes:

  • The i/p ports are buffered whenever o/ps are latched.
  • It does not support interrupt capability/ handshaking.

Mode 1:

Mode 1 of 8255 is I/O with handshaking, so in this type of mode, both the ports like Port A & Port B are used as I/O ports whereas port C is used for handshaking. So this mode supports handshaking by the programmed ports as either i/p or o/p mode. Handshaking signals are mainly used to synchronize the transfer of data between two devices that works at different speeds. The inputs & outputs in this mode are latched and this mode also has the ability to interrupt handling & signal control to match the CPU & IO device’s speed.

Mode 2:

Mode2 is a Bidirectional I/O port with handshaking. So, the ports in this type of mode can be used for the bidirectional data flow through handshaking signals. The group A pins can be programmed to perform like bidirectional data bus & PC7 – PC4 in port C are used through the handshaking signal. The remaining lower port C bits are used for input/Output operations. This mode has the capacity of interrupt handling.

8255 Microprocessor Working

The 8255 microprocessor is a general-purpose programmable I/O device mainly designed for transferring the data from I/O to interrupt I/O in certain conditions as necessary. This can be used almost with any microprocessor. This microprocessor includes 3 8-bit bidirectional I/O ports which can be arranged as per the requirement like PORT A, PORT B & PORT C. This PPI 8255 is mainly designed to interface the CPU with its outside world like the keyboard, ADC, DAC, etc. This microprocessor can be programmed based on a particular condition.

8255 PPI Interfacing with 8086

The need for interfacing the 8255 PPI with the 8086 microprocessor is; the 8086 microprocessor triggers the input RD pin of 8255 once it needs to read the available data within an 8255 port. For 8255, It is an active low i/p pin. This pin is connected to WR o/p of 8086 microprocessor. The 8086 microprocessor triggers the WR i/p of 8255 once it needs to write data toward a port of 8255.

8255 transfers data with an 8-bit data bus to the 8086 microprocessor. The serial communication protocol is used for communication between 8086 & 8255. The two address lines A1 & A0 are utilized to make inside selections within 8255. The data bus pins of 8255 like D0 to D7 are connected to 8086 microprocessor’s data lines, read input pins like RD’ & write input pins like WR’ is connected to I/O read and I/O write of 8086.

They have four main ports to select PA, PB, PC & control word. These ports are mainly used for transferring data and the control word is selected for sending signals. Two signals are sent to 8255 like the I/O signal and BSR signal. The I/O signal is used for initializing the mode & direction of the ports whereas BSR is useful for setting and resetting a signal line.

In the following device, assume the device connected to be an input device. At first, this device looks for permission from PPI so that it can transmit data.

8255 PPI Interfacing with 8086
                                  8255 PPI Interfacing with 8086

The 8255 PPI allows Input devices to transmit data, whenever there is no left data within 8255 which must be transmitted to the 8086 processor. If 8255 PPI has some previous left data then it is not still sent to the 8086 microprocessor, then it doesn’t allow the Input device.

When 8255 PPI allows input device, then data is obtained & stored within temporary registers of 8255 PPI. When 8255 PPI holds some data, then that must be transmitted to 8086 microprocessor, then transmits a signal to PPI.

Once the 8086 microprocessor is free to get the information, then 8086 transmits back a signal, then transmission of data occurs between 8255 & 8086. If the 8086 microprocessor does not turn into free up for a long time, that means 8255 PPI includes some value that is not sent to the 8086 microprocessor, thus 8255 PPI does not allow the Input device to transmit any data because the data existing will be overwritten. The curved arrow signal represented in the above diagrams is known as the handshake signal. So this data transmission process is known as handshaking.

Factors need to be considered for Interfacing with 8255

There are many things that need to consider while interfacing 8255 which are discussed below.

  • The 8255 ports in an un-programmed state are input ports because if they are o/p ports within the unconfigured state, any i/p device is connected to it – the input device will also be generating an output on the port lines and 8255 will also be producing an output. When two outputs are tied together it results in the destruction of one/both devices.
  • The 8255 output pins cannot be utilized for powering-up devices because they are not capable of supplying the necessary driving current.
  • Whenever motors or lamps or speakers are connecting to 8255 then need to check the current rating of the devices & 8255.
  • When 8255 is not capable of supplying the necessary driving current, use inverting like 7406 and noninverting amplifiers like 7407. When large current requirements, transistors can be used in the configuration of a Darlington Pair.
  • Whenever a DC motor is interfaced to 8255 then choose suitable H-Bridges based on the specification of the motor because H-bridges will allow a DC motor to run in any direction.
  • Port A & Port B can be used as 8-bit ports only, thus all pins of these ports must be input or output.
  • When AC-powered devices are connected to 8255 then a relay must be used for protection.
  • Once Port A & B are programmed within Mode 1 or Mode 2 then Port C cannot work as a normal I/O port.

Q: How is the 8255 coprocessor interfaced with the microprocessor?

A: The 8255 coprocessor is interfaced with the microprocessor using an address bus and a data bus. The microprocessor sends control signals and commands to the 8255 coprocessor via the data bus, and the 8255 coprocessor sends and receives data via the data bus.

Q: What are the three modes of operation in the 8255 coprocessor?

A: The three modes of operation in 8255 coprocessor are:

Mode 0: Basic Input/Output mode
Mode 1: Strobed Input/Output mode
Mode 2: Bi-directional bus mode

Q: How does the 8255 coprocessor handle interrupts?

A: The 8255 coprocessor can generate an interrupt when a specific input or output condition is met. The interrupt can be programmed to occur on a specific port or on a specific bit within a port. The microprocessor can then respond to the interrupt by executing a specific interrupt service routine.

Q: What are the applications of the 8255 coprocessor?

A: The 8255 coprocessor was widely used in the 1980s to provide parallel input/output functionality for microprocessors. It was used in many applications such as data acquisition, process control, and industrial automation.

Q: How does the 8255 coprocessor handle handshake signals?

A: The 8255 coprocessor has built-in handshake signal generation capability. It can generate and respond to various handshake signals such as READY, ACK, and BUSY. These signals can be used to control the flow of data between the microprocessor and the 8255 coprocessor.

Q: Is the 8255 coprocessor still in use today?

A: The 8255 coprocessor is considered obsolete and is no longer in production. However, it is still used in some older systems or projects that require parallel input/output functionality. There are newer and more advanced peripheral interface chips available today that can perform the same functions as the 8255 coprocessor.

The 8255 coprocessor is considered obsolete today, and it is no longer in production. There are newer and more advanced peripheral interface chips available today that can perform the same functions as the 8255 coprocessor.

One example of a peripheral interface chip that can replace the 8255 is the 8255A, which is a pin-compatible replacement for the 8255 with some added features and improvements.

Another example is the 8254 Programmable Interval Timer, which is a programmable timer and a counter chip that can replace the 8255 in systems that require accurate timekeeping and event counting.
Another option is a modern microcontroller, such as the Arduino or Raspberry Pi, which can be programmed to perform the same I/O operations as the 8255 and has more features.

Additionally, there is a wide variety of general-purpose input/output (GPIO) chips that can be used to provide parallel input/output functionality, such as the 74HC595, MCP23017, and PCF8574.
It’s worth noting that these options are not completely compatible with 8255 and might require software and/or hardware modification in order to be used as a replacement.


The advantages of the 8255 microprocessor include the following.

  • 8255 microprocessor can be used with nearly every microprocessor.
  • Different ports can be assigned as I/O functions.
  • It operates with a +5V regulated power supply.
  • It is a popularly used coprocessor.
  • 8255 coprocessor acts as an interface between the microprocessor & peripheral devices for transferring parallel data.


The applications of the 8255 microprocessor include the following.

  • 8255 microprocessor is used for the connection of the peripheral device & LED or Relay Interface, Stepper Motor Interface, Display Interface, Keyboard Interface, ADC or DAC Interface, Traffic Signal Controller, Lift Controller, etc.
  • 8255 is a popularly used programmable peripheral interface device.
  • This microprocessor is used in transmitting data under different conditions.
  • It is used to Interface with stepper motors & DC motors.
  • The 8255 microprocessor is used extensively in various microcontroller or microcomputer systems as well as home computers like all MSX models & the SV-328.
  • This microprocessor can also be used in the original PC/XT, IBM-PC, PC/jr & clones with various homebuilt computers like the N8VEM.

Thus, this is an overview of an 8255 Microprocessor – architecture, working with applications. The 82C55 microprocessor is a general-purpose programmable I/O device, used with various microprocessors. The industry standard configuration with a high-performance 82C55 microprocessor is well-matched with the 8086. Here is a question for you, what is an 8086 microprocessor?