© Koninklijke Philips Electronics N.V. 2005. All rights reserved.
User manual
Rev. 01 — 15 August 2005
284
Philips Semiconductors
UM10139
Volume 1
Chapter 19: RTC
PREINT = int (PCLK / 32768)
−
1 = 304 and
PREFRAC = PCLK
−
([ 1]
×
32768) = 5,760.
In this case, 5,760 of the prescaler output clocks will be 306 (305 + 1) PCLKs long, the
rest will be 305 PCLKs long.
In a similar manner, any PCLK rate greater than 65.536 kHz (as long as it is an even
number of cycles per second) may be turned into a 32 kHz reference clock for the RTC.
The only caveat is that if PREFRAC does not contain a zero, then not all of the 32,768 per
second clocks are of the same length. Some of the clocks are one PCLK longer than
others. While the longer pulses are distributed as evenly as possible among the remaining
pulses, this "jitter" could possibly be of concern in an application that wishes to observe
the contents of the Clock Tick Counter (CTC) directly(
Section 19.4.4 “Clock Tick Counter
Register (CTCR - 0xE002 4004)” on page 278
19.6.4 Prescaler
operation
The Prescaler block labelled "Combination Logic" in
determines when the
decrement of the 13-bit PREINT counter is extended by one PCLK. In order to both insert
the correct number of longer cycles, and to distribute them evenly, the combinatorial Logic
associates each bit in PREFRAC with a combination in the 15-bit Fraction Counter. These
associations are shown in the following
Fig 62. RTC prescaler block diagram
To clock tick
counter clock
13 BIT INTEGER COUNTER
(DOWN COUNTER)
15 BIT FRACTION COUNTER
COMBINATORIAL LOGIC
15 BIT FRACTION REGISTER
(PREFRAC)
15
15
15
13 BIT RELOAD INTEGER
REGISTER
(PREINT)
13
13
VPB Bus
PCLK
(VPB Clock)
CLK
CLK
RELOAD
UNDERFLOW
Extend
reload