Result Range

The output from an ADC conversion is given by the following equations:

Single-Ended 12-bit conversion=VINP×GainVREF×4096[0,4095]
Single-Ended 8-bit conversion=VINP×GainVREF×256[0,255]
Differential 12-bit conversion=(VINPVINN)×GainVREF×2048[-2048,2047]
Differential 8-bit conversion=(VINPVINN)×GainVREF×128[-128,127]
VINP and VINN are the positive and negative inputs to the ADC and VREF is the selected voltage reference. The gain is between 1x and 16x as configured in the PGA, and 1x if the PGA is not in use.

The ADC has two output registers, the Sample (ADCn.SAMPLE) and Result (ADCn.RESULT) registers. The 16-bit Sample register will always be updated with the latest ADC conversion output (one sample). In Single conversion mode, both the Sample (ADCn.SAMPLE) and Result (ADCn.RESULT) registers are identical.

With a Single-Ended 12-bit conversion, the voltage applied to the analog pin is calculated by:

VINP=ADCn.SAMPLE×VREF4096×Gain