That is good and simple, but does it debounce the switch.
I didn't even realize that toggle command was in there. I that case I could change my code to:
input portb.0
start:
If portb.0 = 1 then
toggle portb.1
pause 1000
endif
goto start
I still think you need the pause of at least a second. Otherwise the light will pulse when you are holding the button. You need a delay to allow the user to remove there finger.
both will work, mine just sit there until the button is release, then it allow a 50mSec of debouncing delay.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Hello friends,
What I want is this:
If RB0 is 0 RB1 is ON and IF RB0 is 1 RB0 is off , every time that presses the led it should change state.
Thank you
Originally Posted by mister_e
in a loop it have to work.Code:PORTB.1=~PORTB.0
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Hello mister and,
Can give me an example about this please. PORTB.1=~PORTB.0
Thank you
Leonard
Originally Posted by mister_e
Bookmarks