Open In App

Interface 8255 with 8085 microprocessor for addition

Problem – Interface 8255 with 8085 microprocessor and write an assembly program that determines the addition of contents of port A and port B and stores the result in port C. 

Example –  



Algorithm – 



  1. Construct the control word register
  2. Input the data from port A and port B
  3. Add the contents of port A and port B
  4. Display the result in port C

Program –  

Mnemonics Comments
MVI A, 92H A ← 92
OUT 83H Control Register ← A
IN 80H A ← Port A;
MOV B, A B ← A;
IN 81H A ← Port B;
ADD B A ← A+B;
OUT 82H Port C ← A
RET Return

Explanation –  

D7=1 as it is in I/O mode.
D6=0 & D5=0 as Port A is in m0 mode.
D4=1 as Port A is taking input.
D3=0 & D0=0 as Port C is not taking part.
D2=0 as mode of Port B is m0.
D1=1as Port B is taking the input.

Advantages:

Disadvantages:

Article Tags :