Question: Using the debounce program as a base, insert another button to activate another LED i have this code that i have done, but i did
Using the debounce program as a base, insert another button to activate another LED
i have this code that i have done, but i did with one button and one led, i got problems adding one more button to one another led
.ORG 0X0000
main: LDI R16, 0XFF OUT DDRD, R16 LDI R16, 0X00 OUT DDRC, R16 LDI R16, 0XFF OUT PORTC, R16
LOOP: SBIC PINC, PC2 RJMP LOOP RJMP BT_PRESS BT_PRESS:
RCALL delay SBIS PINC, PC2 RJMP BT_PRESS RJMP BT_free
BT_free: SBI PIND, PD5 RJMP LOOP
DELAY: ; debouncing DEC R17 BRNE DELAY DEC R18 BRNE DELAY RET
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
