Re: IF ....THEN.... problems
In 16F84 MCLR pin can't be disabled, so 4k7 resistor pullup to +5V or its never going to work
Also for the used inputs use 10K pullups and instead of using the button command, try something a lot simpler:
Code:
b0 = 0 'reset flag
if ti = 0 then 'if pullup pin is in ground
b0 = 1 'activate button press flag
pause 250 'debounce
endif
Try explaining a little better your circuit so i can help you with your code (maybe an schematic or diagram?)
Also remeber that a 16F84 its not the same as a 16F84A for the compiler, check for that.
"If at first doesn't work, kicking it wont help either"
Bookmarks