littletransistor
New Member
Hey there,
I'm making the switch debouncing thing to work, but however, I end up the whole LED blinking instead of one touch switch, LED ON, and then another one, LED OFF.
Here's the code I've squeezed out so far. Wow, ASM is really tough!
Anything missing here?
I'm making the switch debouncing thing to work, but however, I end up the whole LED blinking instead of one touch switch, LED ON, and then another one, LED OFF.
Here's the code I've squeezed out so far. Wow, ASM is really tough!
Code:
main
btfsc PORTA, 3
call LEDOFF
call LEDON
;btfss PORTA, 3
;call LEDON
;call LEDOFF
goto main
;switch1
;call Delay
;btfsc PORTA,3
;return
;btfss PORTC,0
;goto LEDON
;goto LEDOFF
LEDON
bsf PORTC,0
call Delay
btfsc PORTA,3
goto LEDON
retlw 0x00
LEDOFF
bcf PORTC,0
call Delay
btfsc PORTA,3
retlw 0x00
goto LEDOFF
Anything missing here?