On 30/05/10 22:12, James Bensley wrote:
I unplug the pot from the analog input so it should be reading nothing but it drops to about 450 and fluctuates around there when surely it should drop to 0 (mystery voltage from somewhere perhaps?), then I plug the pot back in the analog input and you can see it go back up and fluctuate. This is the case irrelevant of which port the pot is plugged into and weather it is plugged in or not it still reads something?
It's normal for an open input to fluctuate somewhat, which is why it is common practice to tie ports high or low with a highish value resistor. The input itself represents an almost zero load so EMI etc can cause the pin to "float"
If you were just using a potentiometer then you don't need to tie the ports as it should be relatively stable if you wire up the pot as a voltage divider and not as a series resistor. How did you have it wired when you performed this experiment ?
Also be aware that it will only be as stable as your circuit supply..are you running from battery here or something else ?