I tend to use a 10k Lin pot with one leg connected to +ve (5v) and a 0.1uf cap between the other leg and GND - the wiper then goes to the PIN.
Using the scale value in the POT statement you should be able to get the range right so the value is 0 at one end of the travel, to 255 at the other.
Edit - just noticed that you have an LCD attached - then using
would show the value for the variable D in deceimal on the second line, so you can calibrate the range exactlyCode:Pot PORTA.0,scale,D LCDOUT $FE,$C0, "Cal value " ,#D ; where D is the varible used in the POT statement




Bookmarks