ade7166 Analog Devices, Inc., ade7166 Datasheet - Page 116

no-image

ade7166

Manufacturer Part Number
ade7166
Description
Single-phase Energy Measurement Ic With 8052 Mcu, Rtc, And Lcd Driver
Manufacturer
Analog Devices, Inc.
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
ade7166ASTZF16
Manufacturer:
VHK
Quantity:
2
Part Number:
ade7166ASTZF16
Manufacturer:
Analog Devices Inc
Quantity:
10 000
Part Number:
ade7166ASTZF16-RL
Manufacturer:
KOA
Quantity:
50 000
Part Number:
ade7166ASTZF16-RL
Manufacturer:
Analog Devices Inc
Quantity:
10 000
Part Number:
ade7166ASTZF8
Manufacturer:
Analog Devices Inc
Quantity:
10 000
Part Number:
ade7166ASTZF8-RL
Manufacturer:
Analog Devices Inc
Quantity:
10 000
ADE7566/ADE7569/ADE7166/ADE7169
REAL-TIME CLOCK
The ADE7566/ADE7569/ADE7166/ADE7169 have an
embedded real-time clock (RTC) as shown in
external 32.768 kHz crystal is used as the clock source for the
RTC. Calibration is provided to compensate the nominal crystal
frequency and for variations in the external crystal frequency
over temperature. By default, the RTC is maintained active in all
power saving modes. The RTC counters retain their values
through watchdog resets and external resets. They are only reset
during a power-on reset.
CALIBRATED
32.768kHz
HUNDREDTHS COUNTER
INTERVAL COUNTER
SECOND COUNTER
MINUTE COUNTER
HOUR COUNTER
PRESCALER
INTVAL SFR
32.768kHz
CRYSTAL
HTHSEC
HOUR
8-BIT
8-BIT
SEC
MIN
RTCEN
Figure 101. RTC Implementation
RTCCOMP
CALIBRATION
EQUAL?
TEMPCAL
MIDNIGHT EVENT
SELECTION
ITS1
INTERVAL
TIMEBASE
MUX
Figure 101. The
ITS0
ALARM
EVENT
ITEN
Rev. A | Page 116 of 144
RTC REGISTERS
Note that all the real-time clock SFRs are not bit addressable.
Table 119. Real-Time Clock SFR
SFR
TIMECON
HTHSEC
SEC
MIN
HOUR
INTVAL
RTCCOMP
TEMPCAL
Protecting the RTC from Runaway Code
To protect the RTC from runaway code, a key must be written
to the KYREG register to obtain write access to the Interrupt
Pins Configuration SFR (INTPR, 0xFF), Hundredths of a
Second Counter SFR (HTHSEC, 0xA2), Seconds Counter SFR
(SEC, 0xA3), Minutes Counter SFR (MIN, 0xA4), and Hours
Counter SFR (HOUR, 0xA5). KYREG should be set to 0xEA to
unlock it and reset it to zero after a timekeeping register is
written to. The RTC registers can be written using the following
8052 assembly code:
MOV
MOV
KYREG,#0EAh
INTPR,#080h
Address
0xA1
0xA2
0xA3
0xA4
0xA5
0xA6
0xF6
0xF7
Description
RTC Configuration (see Table 120).
Hundredths of a Second Counter
(see Table 121).
Seconds Counter (see Table 122).
Minutes Counter (see Table 123).
Hours Counter (see Table 124).
Alarm Interval (see Table 125).
RTC Nominal Compensation
(see Table 126).
RTC Temperature Compensation
(see Table 127).

Related parts for ade7166