How do I stop floating pin

Status
Not open for further replies.

1Steveo

New Member
Im using a 12f629 but have a radom input on the input pin GPIO.3.
I'm tring to use this pin to check for a Low input, but when it is open the chip goes nuts!

I tried The "ALL DIGITAL = TRUE" command
And set other pins to outputs

Any suggestions


Steve
 

For a start post the circuit!.
 
You must always keep input pin's in a known state, If you have a switch connected to gnd, when the switch is closed you have '0' on your input, but when the switch is open the pin is floating (not a known state). You should add a pull-up resistor to your 5V supply. This will keep the pin at '1' when the switch is open
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…