
Originally Posted by
earltyso
Simple question...
I was thinking of adding + 1 to a variable with a initial condition of zero... each time the button is pushed then divide it down to an even or odd number. If odd the relay stays high, if even the relay if off.
Could I use toggle to do this more simply?
Hi, Martian
You also have, using a single BIT :
IF Condition_true then relay_state = relay_state ^ 1
...
Alain
************************************************** ***********************
Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
************************************************** ***********************
IF there is the word "Problem" in your question ...
certainly the answer is " RTFM " or " RTFDataSheet " !!!
*****************************************
Bookmarks