
XC161 Derivatives
Peripheral Units (Vol. 2 of 2)
Real Time Clock
User’s Manual
15-2
V2.2, 2004-01
RTC_X8, V2.1
15.1
Defining the RTC Time Base
The timer chain of the RTC is clocked with the count clock signal
f
RTC
which is derived
from the auxiliary oscillator or from the prescaled main oscillator (see
). Optionally prescaled by a factor of 8, this is the basic RTC clock.
Depending on the operating mode, timer T14 may provide the count increments used by
the application and thus determine the input frequency of the RTC timer, that is, the RTC
time base (see also
The RTC is also supplied with the system clock
f
SYS
of the XC161. This clock signal is
used to control the RTC’s logic blocks and its bus interface. To synchronize properly to
the count clock, the system clock must run at least four times faster than the count clock,
this means
f
SYS
≥
4
×
f
CNT
.
Figure 15-2
RTC Clock Supply Block Diagram
For an example,
lists the interrupt period range and the T14 reload values
(for a time base of 1 s and 1 ms):
Note: Select one value from the reload value pairs, depending if the 8:1 prescaler is
disabled/enabled.
Table 15-1
RTC Time Base Examples
Oscillator
Frequency
T14 Intr. Period
Reload Value A
Reload Value B
Min.
Max.
T14REL
Base
T14REL
Base
32.768 kHz
30.52
µ
s
16.0 s
8000
H
/F000
H
1.000 s
FFDF
H
/
FFFC
H
1.007 ms/
0.977 ms
Clock
Generation
Unit
MCB05413
8:1
MUX
PRE
f
CNT
RTC
Count
Clock
1
0
f
SYS
32:1
>1
f
OSCa
f
OSCm
Aux.
OSC
Main
OSC
f
RTCa
f
RTCm
MUX
f
RTC
REFCLK
RUN
MUX
RTC
Module
Clock
RTCCM
SYSCON0.14
1
0
Sync Mode
Async Mode