![Micro crystal RV-8063-C7 Applications Manual Download Page 28](http://html1.mh-extra.com/html/micro-crystal/rv-8063-c7/rv-8063-c7_applications-manual_1784955028.webp)
Micro Crystal
Ultra Small Real-Time Clock Module with SPI-Bus Interface
RV-8063-C7
October 2018
28/58
Rev. 1.1
USE OF THE COUNTDOWN TIMER
4.7.4.
The timer has four selectable source clocks allowing for countdown periods in the range from 244 µs to 4 hours 15
min. For periods longer than 4 hours, the alarm function can be used.
Timer Clock Frequency and timer periods:
TD
Timer Clock Frequency
(1)
Period
Minimum Period,
Timer Value = 1
Maximum Period,
Timer Value = 255
00
4.096 kHz
244 µs
62.256 ms
01
64 Hz
(2)
15.625 ms
3.984 s
10
1 Hz
(2)
1 s
255 s
11
1/60 Hz
(2)
60 s
4 hours 15 min
(1)
When not in use, the TD field is recommended to
be set to 11 (1⁄60 Hz) for power saving.
(2)
Time periods can be affected by compensation pulses (64 Hz only in MODE = 1), (see FREQUENCY OFFSET COMPENSATION).
Note that all timings are generated from the 32.768 kHz oscillator and therefore, based on the frequency
characteristics specified for the device, have a temperature profile with a parabolic frequency deviation which can
result in a change of up to 150 ppm across the entire operating temperature range of -40°C to 85°C (max. ± 20
ppm at 25°C).
The timer counts down from the software-loaded 8-bit binary Timer Value in register 10h. Timer Values from 1 to
255 are valid. Loading the counter with 0 stops the timer.
When the counter decrements from 1, the Timer Flag (bit TF in register Control2) is set and the counter
automatically re-loads and starts the next timer period.
General countdown timer behavior:
Timer Value
Timer Clock
Countdown counter
TE
TF
INT
xx
03
xx
03
02
01
03
02
01
03
02
01
03
period
period
The first period has an uncertainty.
See table "First period duration for Timer Value n"
In this example, it is assumed that the Timer Flag TF is cleared before the next countdown period expires and
that the pin
INT
̅̅̅̅̅
is set to Pulse Mode (TI_TP bit = 1).
If a new Timer Value is written before the end of the current timer period, then this value takes immediate effect. It
is not recommended changing the Timer Value without first disabling the counter by setting bit TE logic 0. The
update of the Timer Value is asynchronous to the Timer Clock.
Therefore changing it without setting bit TE logic 0 may result in a corrupted value loaded into the countdown
counter. This results in an undetermined countdown period for the first period. The Timer Value will, however, be
correctly stored and correctly loaded on subsequent timer periods.