PDA

View Full Version : I'm getting strange Results using POT or RCTIME on PortB (or GPIO Port)



Melanie
- 15th July 2004, 20:01
Have you got Weak Pull-Up's enabled?

If you have, then they'll throw the results. Switch them OFF prior to using those commands... you can always switch them back on afterwards.

OPTION_REG.7=1 ' Switch OFF weak pull-up's

OPTION_REG.7=0 ' Switch-ON weak pull-up's

Note the reverse notation 1=OFF, 0=ON in this case.


On 12F series PICs see the WPU Register in the Datasheet...

Example:

WPU.0=0 ' Switch-OFF weak pull-up on GPIO.0