5.1 Result Range

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

Single-Ended conversion = V I N P × Gain V R E F × 4096 [ 0 , 4095 ]
Differential conversion = ( V I N P V I N N ) × Gain V R E F × 2048 [ -2048 , 2047 ]
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 Series Accumulation mode, after the SAMPNUM number of conversions are finished, the Result register will be updated with the accumulated result.

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

V I N P = ADCn.RESULT × V R E F 4096 × Gain × SAMPNUM