bq3285
n
The update-ended interrupt, which occurs at the end
of each update cycle
Square-Wave Output
The bq3285 divides the 32.768kHz oscillator frequency
to produce the 1Hz update frequency for the clock and
calendar. Thirteen taps from the frequency divider are
fed to a 16:1 multiplexer circuit. The output of this mux
is fed to the SQW output and periodic interrupt genera-
tion circuitry. The four least-significant bits of register
A, RS0–RS3, select among the 13 taps (see Table 3). The
square-wave output is enabled by writing a 1 to the
square-wave enable bit (SQWE) in register B.
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 bq3285 interrupt
events:
Interrupts
n
n
Enable interrupt events and use the interrupt request
output to invoke an interrupt service routine.
The bq3285 allows three individually selected interrupt
events to generate an interrupt request. These three in-
terrupt events are:
Do not enable the interrupts and use a polling routine
to periodically check the status of the flag bits.
n
n
The periodic interrupt, programmable to occur once
The individual interrupt sources are described in detail
in the following sections.
every 122µs to 500ms
The alarm interrupt, programmable to occur once per
second to once per day
Table 3. Square-Wave Frequency/Periodic Interrupt Rate
Register A Bits
RS2 RS1
Square Wave
Periodic Interrupt
RS3
0
RS0
0
Frequency
None
256
128
8.192
Units
Period
None
Units
0
0
0
0
0
0
1
1
1
1
0
0
0
0
1
1
1
1
0
1
1
0
0
1
1
0
0
1
1
0
0
1
1
1
Hz
Hz
3.90625
7.8125
122.070
244.141
488.281
976.5625
1.95315
3.90625
7.8125
15.625
31.25
ms
ms
µs
0
0
0
1
kHz
kHz
kHz
kHz
Hz
0
0
4.096
2.048
1.024
µs
0
1
µs
0
0
µs
0
1
512
ms
ms
ms
ms
ms
ms
ms
ms
ms
1
0
256
128
64
32
16
8
Hz
1
1
Hz
1
0
Hz
1
1
Hz
1
0
Hz
62.5
1
1
Hz
125
1
0
4
Hz
250
1
1
2
Hz
500
Jan. 1999 E
6