3.2 Accumulate

In Accumulation mode, the ADC acquires samples and sums them in an internal accumulator. Accumulation is a kind of signal integration, with each sample added together. See Figure 3-1.
Figure 3-1. Example Integration of an Accumulated Signal

Using the computation features of the ADC, perform accumulation to find the time to reach a value by using the threshold interrupt features of the ADC. See the mathematical expression below.

V a l u e Δ t n = 0 u ( n * Δ t )
T n * Δ t

Where: n = sample number, Value = result to stop at, ∆t = time between samples

Integrate for a set length of time (T) is an alternative way to use this feature. For example:

k = f l o o r ( T Δ t )
Re s u l t Δ t n = 0 k u ( n * Δ t )

Where: n = sample number, k = number of samples to acquire, ∆t = time between samples, T = length of integration