Pratidin
2026 · Electrical Engineering Optional Paper II · 10 marksMainsQuestion 4bii

Design a hardware scheme to interface 8255 (programmable peripheral interface) with 8085, and configure its Port ‘A’ and Port ‘C’ as input ports and Port ‘B’ as output port.
Write an assembly language program to take two different numbers from Port ‘A’ and Port ‘C’ and display the summation of these numbers on Port ‘B’ as output.
Assume the port addresses are :
Port A = 00H
Port B = 01H
Port C = 02H
Control word register address : 03H.

10 marks · directive: Design

Answer

The core of a good answer

The 8255 is I/O-mapped with A1, A0 selecting the ports and chip select generated when A7 to A2 = 0 and IO/M̅ = 1; control word 99H (mode 0, Port A in, Port C in, Port B out) is written to 03H, and the program reads 00H and 02H, adds them and outputs the sum to 01H.

An outline written by upsc.help, not an official UPSC answer; every fact checked by a separate review. How we work

What the question asks

An interfacing design question: address decoding for the four given addresses, control signal connections, the mode 0 control word derived bit by bit, and a short 8085 program using IN, ADD and OUT.

Answer outline

Introduction

Addresses 00H to 03H differ only in A1 A0, so A1 and A0 of the 8085 drive A1 and A0 of the 8255, and the remaining lines A7 to A2 must be all zero to select the chip.

Step 1: Hardware scheme

Step 2: Control word

Step 3: Program

Step 4: Notes

Conclusion

With control word 99H at 03H, the program reads Port A and Port C, adds them and writes the 8-bit result to Port B.

Examples and data to cite

Facts

Facts to remember

Sources used for the explanation

Write a timed answer in the app