33.4.2.4 Output Formats

The resolution of an ADC output is determined by the number of bits in the conversion result:
  • An 8-bit ADC provides 256 discrete levels (from 0 to 255)
  • A 10-bit ADC provides 1024 discrete levels (from 0 to 1023)
  • A 12-bit ADC provides 4096 discrete levels (from 0 to 4095)
  • A 13-bit ADC provides 8192 discrete levels (from 0 to 8191)

A single-ended conversion measures one input voltage against ground. The result of an n-bit single-ended conversion is an unsigned (positive) integer between 0 and the maximum value 2n - 1:

RESULT:0RESULT2n1

The result of an n-bit single-ended conversion, as provided in the Result (RESULT) register, is given by the following equation:

RESULT=VINPVREF×2n

Note:
  • VINP: Input voltage from the positive input multiplexer
  • VREF: Voltage reference

A differential conversion measures the difference between two input voltages. The result of an n-bit differential conversion is a signed (positive or negative) integer between -2n - 1 and 2n - 1 - 1:

RESULT:2n1RESULT2n11

The result of an n-bit differential conversion, as provided in the Result (RESULT) register, is given by the following equation:

RESULT=VINPVINNVREF×2n1

Note:
  • VINP: Input voltage from the positive input multiplexer
  • VINN: Input voltage from the negative input multiplexer
  • VREF: Voltage reference

Single-ended conversions are represented as unsigned values, while differential conversions use signed values in two’s complement form. When the conversion result does not occupy the whole register, the unused bits are set to ‘0’. However, for differential conversion results, the unused bits to the left of the result replicate the sign bit. This process, known as sign extension, ensures that the value retains its correct positive or negative sign when interpreted as a larger bit-width number.

The ADC has two output registers: The Sample (SAMPLE) and Result (RESULT) registers. The SAMPLE register is always updated with the latest ADC conversion output (one sample). In series and burst accumulation modes, samples are added together in an internal sample accumulator, which is configured by the Sample Accumulation Number Select bit field in the Control D register (CTRLD.SAMPNUM). The accumulated result is automatically transferred to the RESULT register when all samples are completed. In single conversion modes, the RESULT register is updated with the latest sample, making it identical to the SAMPLE register.

The Result Scaling bit field in the Control D register (CTRLD.SCALING) determines how data are presented in the SAMPLE and RESULT registers, as shown in the following table.

Table 33-1. Scaling
DescriptionSAMPLERESULT
NoneLSb at bit 0Accumulated value with LSb at bit 0
Left AdjustMSb at bit 15Accumulated value is scaled corresponding to the number of samples. Up to 16 bits available, with MSb at bit 15.
AverageLSb at bit 0Accumulated value divided by the number of samples, with LSb at bit 0

The data format for a single-ended conversion sample is an unsigned number, where 0x0000 represents zero and 0x0FFF represents the largest value (full scale). For differential conversions, the data format is two's complement with sign extension.

The following tables show the RESULT register output formats for single-ended and differential conversions, based on mode of operation, scaling, and resolution.

Table 33-2. RESULT Register - Single-Ended Mode
MODESCALINGRESRESULT
313029282726252423222120191817161514131211109876543210
SINGLE

NORMAL

AVERAGE
80x00Conversion[7:0]
100x00Conversion[9:0]
120x00Conversion[11:0]
130x00Conversion[12:0]
LEFTADJ80x00Conversion[7:0]0x00
100x00Conversion[9:0]0x00
120x00Conversion[11:0]0x00
130x00Conversion[12:0]0x00

SERIES

BURST
NORMALX0x00Accumulation[23:0]
AVERAGE80x00Average[7:0]
100x00Average[9:0]
120x00Average[11:0]
130x00Average[12:0]
LEFTADJX0x00Left Adjusted Accumulation[15:0]
Table 33-3. RESULT Register - Differential Mode
MODESCALINGRESRESULT
313029282726252423222120191817161514131211109876543210
SINGLE

NORMAL

AVERAGE
8Sign ExtensionConversion[7:0]
10Sign ExtensionConversion[9:0]
12Sign ExtensionConversion[11:0]
13Sign ExtensionConversion[12:0]
LEFTADJ8Sign ExtensionConversion[7:0]0x00
10Sign ExtensionConversion[9:0]0x00
12Sign ExtensionConversion[11:0]0x00
13Sign ExtensionConversion[12:0]0x00

SERIES

BURST
NORMALXSign ExtensionAccumulation[23:0]
AVERAGE8Sign ExtensionAverage[7:0]
10Sign ExtensionAverage[9:0]
12Sign ExtensionAverage[11:0]
13Sign ExtensionAverage[12:0]
LEFTADJXSign ExtensionLeft Adjusted Accumulation[15:0]
Table 33-4. SAMPLE Register
MODEDIFFSCALINGRESSAMPLE
1514131211109876543210
X0

NORMAL

AVERAGE
80x00Conversion[7:0]
100x00Conversion[9:0]
120x00Conversion[11:0]
130x00Conversion[12:0]
18Sign ExtensionConversion[7:0]
10Sign ExtensionConversion[9:0]
12Sign ExtensionConversion[11:0]
13Sign ExtensionConversion[12:0]
XLEFTADJ8Conversion[7:0]0x00
10Conversion[9:0]0x00
12Conversion[11:0]0x00
13Conversion[12:0]0x00