This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

BQ25638: How are averages calculated by the internal ADC?

Part Number: BQ25638

Tool/software:

ADC Control Register (0x2B) includes the following bits:

ADC_AVG - Setting to 1 provides a running average.

ADC_AVG_INIT - setting to 1 indicates to start the average using a new ADC conversion.

Though the rest of the 87 page datasheet there is no indication of how the aveage works (ie. how many sample, or over what time period is it calculated?)

Can anyone provide more information on what the "running average" means?

Thanks!

  • Hi,

    1)In averaging mode, each new sample is averaged with the previous value of that channel's output register.

    2)When ADC_AVG_INIT = 1, the first converted value is stored without averaging, and each subsequent value is averaged. In this mode,

    the first stored value is X0,

    the second value is (X1 + X0)/2

    the third stored value is (X2 + (X1+X0)/2) / 2 =  (½ X2 + ¼ X1 + ¼ X0), where X0, X1 and X2 are the sequential values measured by the ADC.

    3)When ADC_AVG = 1 in one-shot mode, two samples are taken and averaged.

    Thanks,

    Ning