Question 11.5: Assume that the INT1 pin is connected to a switch that is no...

Assume that the INT1 pin is connected to a switch that is normally high. Whenever it goes low, it should turn on an LED. The LED is connected to P1.3 and is normally off. When it is turned on it should stay on for a fraction of a second. As long as the switch is pressed low, the LED should stay on.

The blue check mark means that this solution has been answered and checked by an expert. This guarantees that the final answer is accurate.
Learn more on how we answer questions.

ORG    0000H
LJMP   MAIN            ;by-pass interrupt

   ;vector table

;- – ISR for INT1 to turn on LED

ORG   0013H             ;INT1 ISR
SETB   P1.3                ;turn on LED
MOV    R3,#255

BACK:         DJNZ    R3,BACK      ;keep LED on for a while

CLR    P1.3                ;turn off the LED
RETI                          ;return from ISR

;- – MAIN program for initialization

ORG   30H

MAIN:          MOV   IE,#10000100B  ;enable external INT 1
HERE:         SJMP   HERE          ;stay here until get interrupted

END

 

1649242321329

Related Answered Questions

Question: 11.22

Verified Answer:

(a) The address range for Y4 is calculated as foll...
Question: 11.25

Verified Answer:

Figure 14-14 shows the design. Notice the role of ...
Question: 11.20

Verified Answer:

The 27128 has a capacity of 128K bits. It has 16K ...