However, an advantage of combining a clock
function with FRAM memory is that data is not lost
regardless of the backup power source.
When a battery is used as a backup source, V
DD
must
be applied prior to inserting the battery to prevent
battery drain. Once V
DD
is applied and a battery is
inserted, the current drain on the battery is
guaranteed to be less than I
BAK
(max).
FM3104/16/64/256
Rev 0.2
May 2003
Page 7 of 22
Trickle Charger
To facilitate capacitor backup the VBAK pin can
optionally provide a trickle charge current. When the
VBC bit, register 0Bh bit 2, is set to 1 the VBAK pin
will source approximately 4 μA until VBAK reaches
VDD or 3.75V whichever is less. In 3V systems, this
charges the capacitor to VDD without an external
diode and resistor charger. In 5V systems, it provides
the same convenience and also prevents the user from
exceeding
the
VBAK
specification.
!
Note: systems using lithium batteries should clear
VBAK circuitry includes an internal 1 K
series
resistor as a safety element.
maximum
voltage
Figure 7. Real-Time Clock Core Block Diagram
Calibration
When the CAL bit in a register 00h is set to 1, the
clock enters calibration mode. In calibration mode,
the CAL/PFO output pin is dedicated to the
calibration function and the power fail output is
temporarily unavailable. Calibration operates by
applying a digital correction to the counter based on
the frequency error. In this mode, the CAL/PFO pin
is driven with a 512 Hz (nominal) square wave. Any
measured deviation from 512 Hz translates into a
timekeeping error. The user converts the measured
error in ppm and writes the appropriate correction
value to the calibration register. The correction
factors are listed in the table below. Positive ppm
errors require a negative adjustment that removes
Calibration Adjustments
Positive Calibration for slow clocks: Calibration will achieve +/- 2.17 PPM after calibration
Measured Frequency Range
Error Range (PPM)
Min
Max
Min
0
512.0000
511.9989
1
511.9989
511.9967
2.18
2
511.9967
511.9944
6.52
3
511.9944
511.9922
10.86
4
511.9922
511.9900
15.20
5
511.9900
511.9878
19.54
6
511.9878
511.9856
23.88
pulses. Negative ppm errors require a positive
correction that adds pulses. Positive ppm adjustments
have the CALS (sign) bit set to 1, where as negative
ppm adjustments have CALS = 0. After calibration,
the clock will have a maximum error of
±
2.17 ppm
or
±
0.09 minutes per month at the calibrated
temperature.
The calibration setting is stored in FRAM so is not
lost should the backup source fail. It is accessed with
bits CAL.4-0 in register 01h. This value only can be
written when the CAL bit is set to a 1. To exit the
calibration mode, the user must clear the CAL bit to a
0. When the CAL bit is 0, the CAL/PFO pin will
revert to the power fail output function.
Max
2.17
6.51
10.85
15.19
19.53
23.87
28.21
Program Calibration Register to:
000000
100001
100010
100011
100100
100101
100110
0
32.768 kHz
crystal
Oscillator
Clock
Divider
Update
Logic
512 Hz
W
R
Seconds
7 bits
Minutes
7 bits
Hours
6 bits
Date
6 bits
Months
5 bits
Years
8 bits
CF
Days
3 bits
User Interface Registers
1 Hz