View on GitHub

MAX1704X Arduino Library

Arduino library for MAX17043/MAX17044 lithium ion battery fuel gauge.

Home - Getting Started - Constructor - Initialization - Functions - Examples

deviceFound() - findFirstDevice() - address() - adc() - voltage() - percent() - version() - compensation() - sleep() - isSleeping() - wake() - reset() - quickstart() - alertIsActive() - clearAlert() - threshold()

alertIsActive()

Description

Gets the current status of the alert interrupt.

Parameters

None

Returns

isActive : bool

Example

This code snippet checks the status of the alert and then clears it if it is active.

if (FuelGauge.alertIsActive())
{
  FuelGauge.clearAlert();
}

Notes

The MAX17043/MAX17044 have an interrupt feature that alerts a host microprocessor whenever the cell’s state of charge, as defined by the SOC register, falls below a predefined alert threshold set at address 0Dh of the CONFIG register. When an alert is triggered, the IC drives the ALRT pin to logic-low and sets the ALRT bit in the CONFIG register to logic 1. The ALRT pin remains logic-low until the host software writes the ALRT bit to logic 0 to clear the interrupt. Clearing the ALRT bit while SOC is below the alert threshold does not generate another interrupt. The SOC register must first rise above and then fall below the alert threshold value before another interrupt is generated. Note that the alert function is not disabled at IC powerup. If the first SOC calculation is below the threshold setting, an interrupt is generated. Entering Sleep mode does not clear the interrupt.

See also threshold(), clearAlert()