dsPIC33A 12-bit 40MSPS Analog-to-Digital Converter (ADC) Deep Dive

Secondary Accumulators

Last modified by Microchip on 2026/03/31 11:01

   Digital Comparators  Gain and Offset Calibration   

Click Play ► to listen to the commentary.

Across all the data channels, there are 48 primary result accumulators (ADnCHxDATA) and 10 secondary accumulators (ADnCHxACC). The last two data channels in each Analog-to-Digital Converter (ADC) are equipped with these 32-bit secondary accumulators.​

Table 1: Channels with Implemented Secondary Accumulators

ADC NumberChannel NumberSecondary Register
16AD1CH6ACC
7AD1CH7ACC
26AD2CH6ACC
7AD2CH7ACC
36AD3CH6ACC
7AD3CH7ACC
46AD4CH6ACC
7AD4CH7ACC
514AD5CH14ACC
15AD5CH15ACC

The secondary accumulator (ADnCHxACC) collects and sums data from the primary accumulator (ADnCHxDATA).

Enable this feature by setting the ACCRO bit (ADnCHxCON2[31]). When ACCRO is set to 1, both ADnCHxDATA and ADnCHxACC support roll-over, allowing for uninterrupted accumulation over multiple sampling cycles.

As illustrated in Figure 1, secondary accumulators function as Second Order Cascaded-Integrator-Comb (CIC) filters, enhancing digital signal processing. Though some CIC operations, such as differentiation, must be implemented in application software. For implementation details, refer to the code example in the product data sheet.

secondary accumulators diagram

Figure 1


Click Play ► to listen to the commentary.

As mentioned above:

  • The secondary accumulator (ADnCHxACC) is implemented on the last two data channels of each ADC.
  • The secondary accumulator (ADnCHxACC) sums the results from the primary accumulator (ADnCHxDATA).

The simple block diagram (Figure 2) illustrates how the output of the primary accumulator is summed with the contents of the secondary accumulator and is stored back into the secondary accumulator.

Secondary Accumulator as Digital Filter

Figure 2

This sum of sums enables advanced digital filtering, such as COMB filter functions, and can be used to detect data slopes across multi-sample operations.