Real-Time Clock (Rtc); Figure 7: Real-Time Support: Real-Time Clock (Rtc), Periodic Interrupt, & Wake-Up Timer - Semtech SH3000 User Manual

Table of Contents

Advertisement

5. Real-Time Clock (RTC)

The Real-Time Clock (RTC) feature uses the internal 32 kHz clock from the low-frequency (LF) oscillator.
As shown in Figure 7, the RTC divides the 32 kHz clock by 128 to produce a 256 Hz clock. The next
divider is a modulo-256 counter, which is readable and write-able from the serial interface. The next stage
is a divide by 60, which provides seconds in BCD format. Another divide-by-60 counter provides minutes
in BCD, followed by a divide-by-24 counter that provides hours in 24-hour mode in BCD format. This in
turn clocks a 16-bit binary counter, which can log up to 65535 days (over 179 years).
Using a 4 ppm 32.768 kHz clock from the LF oscillator, the RTC module keeps time with a maximum error
as low as 2 minutes per year.
32768 Hz
256 Hz
/128
1 Hz
/256
/60
Fractions
Seconds
Minutes
(BIN)
(BCD)
(BCD)
0 - 255
0 - 59
LSB
Figure 7: Real-Time Support: Real-Time Clock (RTC), Periodic Interrupt, & Wake-up Timer
The V
pin can be connected to a backup power supply for the real-time clock, +2.3 to +5.5 V (+1.8 to
BAK
+5.5 V typical). This voltage can be higher or lower than V
capacitor (with external recharge circuit).
When reading the RTC registers (R0x08–R0x0D), the register RTCsubseconds (R0x0D) should be read
first. When the register RTCsubseconds is read, all six bytes of the RTC counters are latched into the
holding registers simultaneously. This avoids problems of counter overflows between individual byte
reads.
The RTC registers can be written to in any order. Only when the register RTCsubseconds is written are
the entire six byte loaded into the RTC counters.
Note: Check the SH3000 Errata document.
SH3000UM version 0.95
Copyright ©2002 Semtech Corporation
/60
/24
16-bit Counter
Hours
Days (BIN)
(BCD)
0 - 65535
0 - 59
0 - 23
2002-08
LSB
32-bit Latch
L
OAD
32-bit Counter
R
ESET
32-bit Comparator
32-bit Latch
L
OAD
32-bit Time Interval
LSB
. Connect a backup battery or backup
DD
SH3000 User Manual
Preliminary
Current Timer
MSB
Value
Interrupt
IO/I
Logic
14
Serial I/O
MSB
21
NT

Advertisement

Table of Contents
loading

Table of Contents