b) An 8255 IC interfaced with the 8086 microprocessor works as an Input-output port as shown in Figure 1.
Data Bus Port-A
8
switches
A2
A0
8
Port-B
LEDs
A3
A1 8255
U2
A5 A6 A7
Port-C
4
7-segment Display
74LS138 4 G1 G2A G2B
CS
A15 A14 A0
PG
Figure 1: Connection diagram of 8255 IC
Find the addresses of ports and control register. (3)
Find the control word. (2)
Find the value of N to load on counter for 100 ms delay if clock frequency is 10 MHz. (5)
Write an assembly language program to read 8-bit switch pattern, turn on the LEDs with opposite pattern for 30 secs, and then with the same pattern for 20 secs; to show the number of ON switches on 7-segment display. (10)