Write a program to turn LED4 and LED1 ON. LED2 and LED3 must be OFF. Cut and pas
ID: 3560188 • Letter: W
Question
Write a program to turn LED4 and LED1 ON. LED2 and LED3 must be OFF.
Cut and paste the source code.
Single step the code. After executing the line that sends the pattern to PTT, cut and paste the Memory Window showing the value of PTT. The Memory Address of PTT is $270. Right-click on Memory Window and select address. Type 270 in the address field.
Write a program to continuously turn all four green LEDs ON and OFF (toggle). There should be a one-second delay between each toggle.
Cut and paste the source code.
Show the delay calculation.
Run the program on the board by pressing the Reset button on the Tower. Describe the values of LEDs.
Write a program that displays values from 0 to 15 sequentially, with a 0.75-second delay in between each display. After the count value reaches 15 (i.e. all LEDs are ON), the program should stop.
Cut and paste the code.
Show the delay calculation.
Run the program on the board by pressing the Reset button on the Tower. Describe the values of LEDs.
Use BSET and BCLR instructions to Turn LED2 ON and OFF continuously with a 0.5-second delay between each change.
Cut and paste the source code.
Show the delay calculation.
Run the program on the board by pressing the Reset button on the Tower. Describe the values of LEDs.
Change the delay to 1ms and run the program. Describe the values of LEDs
Explanation / Answer
LDAA #%01000000 ;to turn-off LED3 and turn-on LED1, LED2, LED4
STAA PORTB
LDAA #%00010000 ;to turn-off LED1 and turn-on LED2, LED3, LED4
STAA PORTB
LDAA #%10111111 ;to turn-on LED3 and turn-off LED1, LED2, LED4
STAA PORTB
LDAA #%11101111 ;to turn-on LED1 and turn-off LED2, LED3, LED4
STAA PORTB
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.