5.58. POT
POT Pin,Scale,Var
Reads a potentiometer (or some other resistive device) on Pin. Pin may be a constant, 0 - 15, or a variable that contains a number 0 - 15 (e.g. B0) or a pin name (e.g. PORTA.0).
The resistance is measured by timing the discharge of a capacitor through the resistor (typically 5K to 50K). Scale is used to adjust for varying RC constants. For larger RC constants, Scale should be set low (a minimum value of one). For smaller RC constants, Scale should be set to its maximum value (255). If Scale is set correctly, Var should be zero near minimum resistance and 255 near maximum resistance.
Unfortunately, Scale must be determined experimentally. To do so, set the device under measure to maximum resistance and read it with Scale set to 127. Adjust Scale until the Pot command returns 254. If 255, decrease the scale. If 253 or lower, increase the scale. (Note: This is similar to the process performed by the Alt-P option of the BS1 environment).
Use the following code to automate the process. Make sure that you set the pot to maximum resistance.
NECESITO UNA AYUDITA PARA HACER UNA CONVERCION UTILIZANDO EL PIC 16F877... TENGO Q TRABAJAR CON UN
POTENCIOMETRO DE 10K COMO ENTRADA ANALOGA Y NECESITO VISUALISAR EN EL LCD LOS OHMIOS DEL POTENCIOMETRO MI PREGUNTA ES COMO HACER ESO NO TENGO NI IDEA..