Insisto usa mejor un adc ya que el pot es muy limitado una vez lo intente usar y desisti ya que como la ayuda dice esta en funcion de la descraga del capacitor no mide realmente la cantidad de resisitencia.
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 255. Under these conditions, Var will produce an appropriate value for Scale. (NOTE: This is the same type of process performed by the Alt-P option of the BS1 environment).
Example
POT 3,255,B0 ' Read potentiometer on Pin3 to determine scale
SEROUT 0,N2400,[#B0] ' Send pot value serially out Pin0
como dice ahi la escala debe ser experimental, osea tu la debes determinar, yo trate de determinarla con el proteus pero nada de nada por eso opte por el uso de adcin que es mas sencillo.
Copyright © 1999 microEngineering Labs