Assembly Language please 4. Write a program to monitor Bit PJ3, which is connect
ID: 3559922 • Letter: A
Question
Assembly Language please
4. Write a program to monitor Bit PJ3, which is connected to a switch. When it is HIGH, send 55H to the output port, PORTB. You also need to define the PJ3 bit as an input port, and PORTB as an output port.
5. Eight switches are connected to PORTB and eight LEDs are connected to PORTA. We would like to monitor the first two least significant bits of PORTB (use masking technique). Whenever both of these bits are set, switch all LEDs of Port A on for one second. Assume that the name of the delay subroutine is DELAY. You do not need to write the code for the delay procedure.
Explanation / Answer
SETB PJ3
AGAIN: JNB PJ3, AGAIN
MOV B,#55H
SJMP AGAIN
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.