5 validating the battery, Validating the battery, Figure 5-4: crystal compensation – Maxim Integrated 71M6534 Energy Meter IC Family Software User Manual
Page 86: F = f, 1 + a/10, T * b/10, T2* c/10

71M653X Software User’s Guide
One method to correct the temperature characteristics of the crystal is to obtain coefficients from the curve in Figure 31
by curve-fitting the PPM deviations A fairly close curve fit is achieved with the coefficients a = 10.89, b = 0.122, and c =
–0.00714 (see Figure 32).
f = f
nom
* (1 + a/10
6
+ T * b/10
6
+ T2* c/10
6
)
When applying the inverted coefficients, a curve (see Figure 5-4) will result that effectively neutralizes the original
crystal characteristics. The frequencies were calculated using the fit coefficients as follows:
32767.5
32767.6
32767.7
32767.8
32767.9
32768
32768.1
32768.2
32768.3
32768.4
32768.5
-50
-25
0
25
50
crystal
curve fit
inverse curve
Figure 5-4: Crystal Compensation
The MPU Demo Code supplied with the TERIDIAN Demo Kits has a direct interface for these coefficients and it directly
controls the QREG and PREG registers. This interface is implemented by the MPU variables Y_CAL, Y_CALC, and
Y_CALC2
(MPU addresses 0x04, 0x05, 0x06). For the Demo Code, the coefficients have to be entered in the form:
1000
2
_
100
_
10
_
)
(
2
CALC
Y
T
CALC
Y
T
CAL
Y
ppm
CORRECTION
⋅
+
⋅
+
=
Note that the coefficients are scaled by 10, 100, and 1000 to provide more resolution. For our example case, the
coefficients would then become (after rounding):
Y_CAL
= 109, Y_CALC = 12, Y_CALC2 = 7
Alternatively, the mains frequency may be used to stabilize or check the function of the RTC. For this purpose, the CE
provides a count of the zero crossings detected for the selected line voltage in the MAIN_EDGE_X address. This count
is equivalent to twice the line frequency, and can be used to synchronize and/or correct the RTC.
5.14.2.5 Validating the Battery
For applications that utilize the RTC it is very important to validate the battery. A brief loss of battery power when the
653X IC is powered down may result in corrupted RTC data.
The battery monitor function can be used to obtain the battery charge status.
After battery power is lost, the RTC is usually invalid, and the MPU start-up code will then set it to read the year 2001,
the month January, and the day 1 (2001/01/01). The time information will be 01:01:01. If the MPU firmware program
detects the date 01/01/2001 upon power-up or reset, it is safe to conclude that the RTC is corrupted, most likely due to
a missing or low-voltage battery.
v1.1v1.1
TERIDIAN Proprietary
86 of 116
© Copyright 2005-2008 TERIDIAN Semiconductor Corporation