![Micro crystal RV-8063-C7 Скачать руководство пользователя страница 27](http://html1.mh-extra.com/html/micro-crystal/rv-8063-c7/rv-8063-c7_applications-manual_1784955027.webp)
Micro Crystal
Ultra Small Real-Time Clock Module with SPI-Bus Interface
RV-8063-C7
October 2018
27/58
Rev. 1.1
COUNTDOWN TIMER FUNCTION
4.7.
TIMER FLAG TF
4.7.1.
The Timer Flag (bit TF) is set logic 1 on the first trigger of the Countdown Timer or the MI and HMI Interrupt. The
purpose of the flag is to allow the controlling system to interrogate what caused the interrupt: Timer/MI/HMI or
Alarm. The flag can be read and cleared by command.
The status of the Timer Flag TF can affect the
INT
̅̅̅̅̅
pulse generation depending on the setting of TI_TP (see TIMER
– Timer Mode):
TIMER INTERRUPT MODE TI_TP
4.7.2.
When Interrupt is in Interval Mode (TI_TP = 0):
only one Interrupt after the first countdown when TF is not cleared
the
INT
̅̅̅̅̅
generation follows the TF flag
TF stays set until it is cleared
If TF is not cleared before the next coming interrupt, no
INT
̅̅̅̅̅
is generated
When Interrupt is in Timer Pulse Mode (TI_TP = 1):
the Countdown Timer runs in a repetitive loop and keeps generating periodic interrupts
an
INT
̅̅̅̅̅
pulse is generated independent of the status of the Timer Flag TF
TF stays set until it is cleared.
TF does not affect
INT
̅̅̅̅̅
PULSE GENERATOR 2
4.7.3.
When the Timer Pulse Mode is activated (TI_TP = 1) the Pulse Generator 2 for the Countdown Timer Interrupt
uses an internal clock and is dependent on the selected Timer Clock Frequency for the countdown timer and on the
Timer Value. As a consequence, the width of the interrupt pulse varies (see following Table). The pulse widths are
not affected by the Offset Mode (bit MODE). TF and
INT
̅̅̅̅̅
become active simultaneously.
INT
̅̅̅̅̅
pulse width when using Countdown Timer:
Timer Clock Frequency
INT
̅̅̅̅̅
pulse width
Timer Value = 1
(1)
Timer Value > 1
(1)
4.096 kHz
122 µs
244 µs
64 Hz
7.812 ms
15.625 ms
1 Hz
15.625 ms
15.625 ms
1/60 Hz
15.625 ms
15.625 ms
(1)
Timer Value = loaded countdown value. Timer stops when Timer Value = 0.