SLYS021A January 2021 – May 2022 INA228
PRODUCTION DATA
The current and charge are calculated after a shunt voltage measurement, while the power and energy are calculated after a bus voltage measurement. Power and energy are calculated based on the previous current calculation and the latest bus voltage measurement. If the value loaded into the SHUNT_CAL register is zero, the power, energy and charge values will be reported as zero.
The current, voltage, and temperature values are immediate results when the number of averages is set to one as shown in Figure 7-2. However, when averaging is used, each ADC measurement is an intermediate result which is stored in the corresponding averaging registers. Following every ADC sample, the newly-calculated values for current, voltage, and temperature are appended to their corresponding averaging registers until the set number of averages is achieved. After all of the samples have been measured the average current and voltage is determined, the power is calculated and the results are loaded to the corresponding output registers where they can then be read.
The energy and charge values are accumulated for each conversion cycle. Therefore the INA228 averaging function is not applied to these.
Calculations for power, charge and energy are performed in the background and do not add to the overall conversion time.