I compiled the code as shown, when powered up the led continues to blink but when I press a button on the keypad which would cause (PORTB >> 4) != 15 it still blinks.....
I have even tried it with the following changes with same response:
cycle:
gosub checkstate
HIGH led
pause 100
LOW led
pause 100
@ Sleep
goto cycle
checkstate:
while (PORTB >> 4) != 15
pause 20
wend
return
its almost like it never see an interrupt to get out of cycle. I also confirmed on PortB by checking with my meter on switch closure. With a switch closed and the bit I checked was PortB.4 I measured it at 2.192Vrms, switch open 4.99Vrms.
Thanks for hanging around
Bookmarks