45.6.2.9 Accumulation

The results of multiple, consecutive conversions can be accumulated. The number of samples to be accumulated is specified by the Sample Number field in the Average Control register (AVGCTRL.SAMPLENUM). When accumulating more than 16 samples, the result will be too large to fit 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 45-1. Accumulation
Number of Accumulated SamplesAVGCTRL. SAMPLENUMNumber of Automatic Right ShiftsFinal Result PrecisionAutomatic Division Factor
10x0012 bits0
20x1013 bits0
40x2014 bits0
80x3015 bits0
160x4016 bits0
320x5116 bits2
640x6216 bits4
1280x7316 bits8
2560x8416 bits16
5120x9516 bits32
10240xA616 bits64
Reserved0xB –0xF12 bits0
Table 45-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