PDA

View Full Version : Make pushbutton "1" when pressed?



Yodoad
- 27th May 2009, 20:56
I have some issues with pushbuttons.
I get a pushbutton with vdd pullups to work (0 when pressed)!
But how do i reverse this?

I have tried this solution but with no success:

loop:
IF portb.5 = 1 THEN LED
GOTO loop

LED:
high porta.2
pause 100
low porta.2
pause 100
goto loop
And schematic in attachment!

savnik
- 27th May 2009, 21:23
Use this schematic

Yodoad
- 27th May 2009, 22:04
Thanks man! It works now!