3.6 Interrupts
In every state of the state machine, the analog input channels are polled and stored in the system status memory. In the Charge state, the charge current measurement is polled faster and accumulated as a coulomb counter for measurement of the battery charge. In the System-On state, the discharge current measurement is polled faster and accumulated as a coulomb counter for measurement of the battery state of change (percent capacity remaining). The remaining charge is also estimated using the battery voltage. By combining the coulomb count and the estimated battery charge, an estimate of the battery health is calculated.