Question

1. Write an assembly program that interfaces switches, SW1 and SW2, and LEDs, LED1 and LED2, as follows (You should use inter

i need assembly program with screenshot of output please

0 0
Add a comment Improve this question Transcribed image text
Answer #1

;Switch interfacing
;
ORG 00H ;starting address

LED EQU P2.0
SWITCH EQU P2.6
  
  
AGAIN:

SETB LED
SETB SWITCH
MOV R3,#3H
  
MONITOR:
  
SETB LED
JB SWITCH, MONITOR
SJMP BLINK_LED
SJMP MONITOR
BLINK_LED:
CLR LED
ACALL WAIT
SETB LED
ACALL WAIT
  
DJNZ R3, BLINK_LED
SJMP AGAIN
  
WAIT:
MOV R0,#0H
HERE3: MOV R1,#0FFH
HERE2: MOV R2,0FFH
HERE: DJNZ R2,HERE
DJNZ R1,HERE2
DJNZ R0,HERE3
  
RET
END

COMMENT DOWN FOR ANY QUERIES,

LEAVE A THUMBS UP IF THIS ANSWER HELPS YOU.

Add a comment
Know the answer?
Add Answer to:
i need assembly program with screenshot of output please 1. Write an assembly program that interfaces...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT