Quote:
Originally Posted by Generalx5
Yeap, I have it done correctly, With the analog input, the signal pin is always logic high, and all I did was plug in a var pot from ground to the signal pin. Is as if you plugged in a solid resistor in its place.
Im sure its done right, as I have used this pot on other robots. So what could be the problem? Is it maybe because Im using V7.5 MPLAB? Could that be it? I tried 7.2 but it wouldnt open any projects.
|
You have
not done it correctly. It is
not done right. Look at the picture Mark provided. The analog input pin wants you to supply a voltage, but according to your definition you're only supplying a resistance. There is a high-valued resistor connected internally from the analog input pin to +5, so your variable resistance combined with that does end up forming a voltage divider (a maximum 10k ohms gives a maximum output of about 1/50 of full scale). If you want to get the proper results you really need to pay attention to the proper wiring for a potentiometer.