calValue Constant

Top  Previous  Next

Gets the internal calibration voltage for the ADC.




The voltage measured by the calibrate function.


The calibrate function measures an accurate internal calibration voltage using the currently selected voltage reference, as set by the reference property. This allows the actual value of the reference voltage to be computed accurately as long as it is greater than calValue. The reference voltage is computed as follows:


Vref = Cell.ADC.calValue * Cell.ADC.max / Cell.ADC.calibrate();


Computing the actual reference voltage is useful if the selected reference voltage is not very accurate. For example, if the reference is based on the power supply voltage it will be no more accurate than the power supply regulator, which can have a tolerance of as much as 5%.

See Also

calibrate Function, reference Property, max Constant