
Interrupts
The bq4285E/L allows three individually selected inter-
rupt events to generate an interrupt request.
These
three interrupt events are:
n
The periodic interrupt, programmable to occur once
every 122
s to 500 ms.
n
The alarm interrupt, programmable to occur once per
second to once per day, is active in battery-backup
mode, providing a “wake-up” feature.
n
The update-ended interrupt, which occurs at the end
of each update cycle.
Each of the three interrupt events is enabled by an indi-
vidual interrupt-enable bit in register B. When an event
occurs, its event flag bit in register C is set. If the corre-
sponding event enable bit is also set, then an interrupt
request is generated.
The interrupt request flag bit
(INTF) of register C is set with every interrupt request.
Reading register C clears all flag bits, including INTF,
and makes INT high-impedance.
Two methods can be used to process bq4285E/L inter-
rupt events:
n
Enable interrupt events and use the interrupt request
output to invoke an interrupt service routine.
n
Do not enable the interrupts and use a polling routine
to periodically check the status of the flag bits.
The individual interrupt sources are described in detail
in the following sections.
Periodic Interrupt
The mux output used to drive the SQW output also
drives the interrupt-generation circuitry. If the periodic
interrupt event is enabled by writinga1tothe periodic
interrupt enable bit (PIE) in register C, an interrupt re-
quest is generated once every 122
s to 500ms. The pe-
riod between interrupts is selected by the same bits in
register A that select the square wave frequency (see Ta-
ble 3). Setting OSC2–OSC0 in register A to 011 does
not affect the periodic interrupt timing.
6
Register A Bits
Square Wave
Periodic Interrupt
OSC2
OSC1
OSC0
RS3
RS2
RS1
RS0
Frequency
Units
Period
Units
0100000
None
0100001
256
Hz
3.90625
ms
0100010
128
Hz
7.8125
ms
0100011
8.192
kHz
122.070
s
0100100
4.096
kHz
244.141
s
0100101
2.048
kHz
488.281
s
0100110
1.024
kHz
976.5625
s
0100111
512
Hz
1.95315
ms
0101000
256
Hz
3.90625
ms
0101001
128
Hz
7.8125
ms
0101010
64
Hz
15.625
ms
0101011
32
Hz
31.25
ms
0101100
16
Hz
62.5
ms
0101101
8
Hz
125
ms
0101110
4
Hz
250
ms
0101111
2
Hz
500
ms
0
1
XXXX
32.768
kHz
same as above defined
by RS3–RS0
Table 3. Square-Wave Frequency/Periodic Interrupt Rate
bq4285E/L