Question
ARM assembly language Make the first green LED turn on when the first button is pressed and turn off when the button is pressed again.
ARM assembly language
Make the first green LED turn on when the first button is pressed and turn off when the button is pressed again. The LED should not change state when the button is released or if the button is held down?
I'm not sure how to write code for this question, here is what i understand so far. Right now I press the button the light is on but it's off when i release the button
.text .global main
.equ LED, 0x41210000 .set BT, 0x41200000
main: ldr r1,=BT ldr r2,=LED loop_1: ldr r0,[r1] cmp r0,#1 beq led_light_1 mov r3 led_dim: mov r0,#0 str r0,[r2] b loop_1 @go back to start of loop
led_light_1: mov r0,#1 str r0,[r2] b loop_1
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started