Beginner in need of help !!
Hi everyone, I am completely new to both these forums & pic programming. I am working with the 12f683 which I have managed to flash led 's read potentiometers etc, very basic stuff.
Now to my question. I want to turn an LED on/off with a single tap of a tactile button. So press & release button: led turns on, then repeat to turn led off.
I knio how to turn an LED on/off by holding the button for on & releasing for off, but I can't work out how to do the above.
Any help would be greatly appreciated, I intend to over come any hiccups, not give up.
Thanks,
Rob
Re: Beginner in need of help !!
The easiest way would be to use the TOGGLE command.
start:
if (your input pin) = 0 then toggle (your led port) : pause 50 : goto start
goto start
Re: Beginner in need of help !!
Please don't post the same question in multiple locations. Pretty much everybody reads all the forums here, and it's helpful to keep all the responses together. Welcome aboard!
Re: Beginner in need of help !!
Sorry Charlie, I wasn't sure of where to post this. I was going to ask a mod to close one of them, bit silly really.