Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

Question 4

The addresses assigned to the three I/O ports and the Command Register (CR) of an Intel 8155
interface chip are as follows: CR - 20H Port A - 21H Port B - 22H Port C - 23H

Note: Parts (a), (b) and (c) should be considered separately.

(a) A switch is connected to bit b0 of Port A and an LED is connected to bit b7 of Port B of the 8155
interface chip. When the switch is ON (Logic 1), the LED turns ON (Logic 1); otherwise the LED is
OFF (Logic 0). Write an 8085 Assembly Language Program (with comments) which reads the
status of the switch and accordingly operates the LED. [5 marks]
(b) Port B of the 8155 interface chip is now connected to the seven-segment-LED display shown in
Figure Q4a. Segments A to G are connected to bits b0 to b6 of Port B respectively. Assume that
decimal point (DP) is not connected. Write an 8085 Assembly Language Program (with
comments) that will display 5H to the sevensegment-LED display. [5 marks]
(c) The 8155 interface chip is connected to an A/D converter as shown in Figure Q4b. PCn
represents bit n of Port C of the 8155. The converter has a timing diagram as shown in Figure
Q4c. Digital data from the A/D converter is transmitted to port A via a tristate buffer which is
enabled by PC3. Status check is used to verify the end of conversion (EC). The digital data is
displayed on a device connected to Port B.

Write an assembly language program (with comments) to start the conversion and when the
conversion is over, to display the digital data in the display unit connected to port B. The program
should repeat this process continuously. Assume that Port C is configured in ALT 3 mode. Bits of Port
C not shown in Figure Q4b can be assumed as don’t cares. [10 marks]

You might also like