33.6.6 Accumulation

The result from multiple consecutive conversions can be accumulated. The number of samples to be accumulated is specified by the Number of Samples to be Collected field in the Average Control register (AVGCTRL.SAMPLENUM). When accumulating more than 16 samples, the result will be too large to match the 16-bit RESULT register size. To avoid overflow, the result is right shifted automatically to fit within the available register size. The number of automatic right shifts is specified in the table below.

Note: To perform the accumulation of two or more samples, the Conversion Result Resolution field in the Control B register (CTRLB.RESSEL) must be set.
Table 33-2. Accumulation
Number of Accumulated SamplesAVGCTRL. SAMPLENUMIntermediate Result PrecisionNumber of Automatic Right ShiftsFinal Result PrecisionAutomatic Division Factor
10x012 bits012 bits0
20x113 bits013 bits0
40x214 bits014 bits0
80x315 bits015 bits0
160x416 bits016 bits0
320x517 bits116 bits2
640x618 bits216 bits4
1280x719 bits316 bits8
2560x820 bits416 bits16
5120x921 bits516 bits32
10240xA22 bits616 bits64
Reserved0xB - 0xF12 bits12 bits0