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
Debe ser sin duda esta funcion la que este utilizando....!