- Trending Categories
- Data Structure
- Operating System
- C Programming
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Interface 8255 with 8085 microprocessor for addition
In this program we will see how to perform addition by using ports to take data and send the result into the port.
Write 8085 Assembly language program for interfacing between 8085 and 8255. Here Port A and Port B are holding two values, take the numbers from port A and B, add them, and send the result at port C.
The task is very simple. At first we have to setup the control word register of 8255 chip. After that we will take the input from port A and B, add the content, and send it to port C.
The control word register is looks like this. It is holding 92H.
The bits of control register signify like this
We are taking 92H into A. Then D7 is 1, so it is working as IO mode, the (D6 and D5) are 00, so it tells that port A is in Mode 1. D4 = 1, so port A is taking the input. The (D3 and D0) are 0 and 0. So port C is not working. And D2 = 0 as B is also in Mode 0, D1 = 1 as it is acts as input port.
In the instruction we will see OUT 83. Here 83 is the port number of Control register port. Similarly, IN 80 indicates that taking the input from port A whose port address is 80. And IN 81 indicates that taking input from port B also. The OUT 82 tells we are sending the result to port C.
|F000||3E, 92|| ||MVI A,92||Load A with Control Word|
|F002||D3, 83|| ||OUT 83||Send output to control register|
|F004||DB, 80|| ||IN 80||Take first input from port A|
|F006||47|| ||MOV B,A||Store A to B|
|F007||DB, 81|| ||IN 81||Take second input from B|
|F009||80|| ||ADD B||Add B with A|
|F00A||D3, 82|| ||OUT 82||Send output to C|
- Decimal addition in 8085 Microprocessor
- Subtract content of two ports by interfacing 8255 with 8085 microprocessor
- Instructions to perform addition in 8085 Microprocessor
- 8255 microprocessor operating modes
- 8255 Programmable Peripheral Interface Chip
- Display interface using serial transfer in 8085 Microprocessor
- Interfacing ADC with 8085 Microprocessor
- Interfacing 8251 USART with 8085 Microprocessor
- Interfacing 8279 Keyboard with 8085 Microprocessor
- Interfacing 8279 Display with 8085 Microprocessor
- Microprocessor 8085 Architecture
- Program for simulating a stopwatch in 8085 Microprocessor
- Program for decimal down counter in 8085 Microprocessor
- Program to check for palindrome in 8085 Microprocessor
- Interfacing 8253 (Timer IC) with 8085 Microprocessor