8255 is a popularly used parallel, programmable input-output device. It can be used to transfer data under various condition from simple input-output to interrupt input-output. This is economical, functional, flexible but is a little complex and general purpose i/o device that can be used with almost any microprocessor.
8255 pin diagram –
It has 24 pins that can be grouped in two 8-bit parallel ports: A and B called Port A(PA) and Port B(PB) with the remaining eight known as Port C(PC). Port C can be further divided into groups of 4-bits ports named Cupper(Cu) and Clower(Cl). There are 40 pins and operates in +5 regulated power supply.
Modes of 8255 – It works in two modes:
- Bit set reset (BSR) mode
- Input/output (I/O) mode
To know in which mode the interface is working we need to know the value of Control word. Control word is a part of control register in 8255 which specify an I/O function for each port. This is format of control word 8255.
If the most significant bit of control word or D7 is 1 then 8255 works in I/O mode else, if it’s value is 0 it works in BSR mode.
- BSR Mode – When MSB of the control register is zero(0), 8255 works in Bit Set-Reset mode.in this only PC bit are used for set and reset.
- I/O Mode – When MSB of the control register is one(1), 8255 works in Input-Output mode.it is further divided into three categories.
- Mode 0 – In this mode all three ports (PA, PB, PC) can work as simple input function or output function also in this mode there is no interrupt handling capabilities.
- Mode 1 – In this either port A or port B can work and port C bits are used as Handshake signal before actual data transmission plus it has interrupt handling capabilities.
- Mode 2 – In this only port A works and port B can work either in Mode 0 or Mode 1 and the 6 bits of port C are used as Handshake signal plus it also has to interrupt handling capability.
To communicate with peripherals through 8255 three steps are necessary:
- Determine the addresses of Port A, B, C and Control register according to Chip Select Logic and the Address lines A0 and A1.
- Write a control word in control register.
- Write I/O intructions to communicate with peripherals through port A, B, C.
The common applications of 8255 are:
- Traffic light control
- Generating square wave
- Interfacing with DC motors and stepper motors
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.
- Programmable peripheral interface 8255
- Interface 8255 with 8085 microprocessor for addition
- Interface 8255 with 8085 microprocessor for 1’s and 2’s complement of a number
- 8255 microprocessor operating modes
- Microprocessor | 8254 programmable interval timer
- Subtract content of two ports by interfacing 8255 with 8085 microprocessor
- Interface 8254 PIT with 8085 microprocessor
- Non Programmable I/O Ports- Intel 8212
- Introduction of Microprocessor
- 8259 PIC Microprocessor
- Memory Banking in Microprocessor
- Pin diagram of 8085 microprocessor
- Pin diagram of 8086 microprocessor
- Interrupts in 8086 microprocessor
- Microprocessor | 8251 USART
- Bus organization of 8085 microprocessor
- Registers of 8085 microprocessor
- Interrupts in 8085 microprocessor
- Bus Cycles of 8086 Microprocessor
- Memory Segmentation in 8086 Microprocessor
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.