I'm not sure there's enough information to give you a definitive answer, but my thoughts:-
The input pins on PIC's are very sensitive, moving your fingers near an unloaded input will cause the input to register. I usually pull the inputs high/low with a 10k resistor.
However you claim to have done this, what I'd suggest then is you're actually reading more than one input? I.E. The bit mask you've applied to read the pin is allowing more than one pin to be read allowing an input to be used that isn't pulled high/low. Ideally you probably want to set any unused pins to be set as outputs and then tri-stated.
Failing that is there any chance another output is 'coupled' to one of the inputs and whatever drives this input is floating?
I have a circuit diagram for a stand alone PIC based rotary table divider I designed, you're welcome to have a look at it - doesn't show much though other than a liberal sprinkling of 10k resistors to pull floating lines up with though![]()


LinkBack URL
About LinkBacks




