|
RV-3029 Datasheet, PDF (29/67 Pages) MICORO CRYSTAL SWITZERLAND – DTCXO Temperature Compensated Real Time Clock | |||
|
◁ |
Micro Crystal
DTCXO Temperature Compensated Real Time Clock / Calendar Module
RV-3029
4.4. TIMER FUNCTION
The RV-3029 offers different Alarm and Timer functions which allow simply generating highly versatile timing-
functions.
The Countdown Timer is controlled by the register Control_1. Bit 1 âTEâ enables the Timer function; bits 5 & 6
âTD0â and âTD1â determine one of 4 Timer Source Clock frequencies (32 Hz, 8 Hz, 1 Hz, or 0.5Hz).
The Timer counts down from a software-loaded 16-bit binary value ,nâ, âTimer Lowâ (bit 0-7 at address 18h) and
âTimer Highâ (bit 0-7 at address 19h). Values, nâ from 1 to 65536 are valid; loading the counter with ,nâ = â0â
effectively stops the timer. The end of every Timer countdown is achieved when the Timer Counter value ,nâ
reaches = â0â.
Countdown Timer can be set in Automatic Reload mode by âTARâ = â1â (bit 2 of register Control_1), the counter
automatically re-loads Timer countdown value, nâ and starts the next Timer period. Automatic reload of the
countdown value ,nâ requires 1 additional timer source clock. This additional timer source clock has no effect on the
first Timer period, but it has to be taken into account since it results in a Timer duration of ,n+1â for subsequent
timer periods.
The generation of Interrupts from the Countdown Timer function is enabled by âTIEâ = â1â (bit 1 in register
Control_INT). If Timer Interrupt is enabled by âTIEâ = â1â, the Timer Flag âTFâ (bit 1 in register Control_INT Flag) will
be set = â1â at the end of every Timer countdown. The Interrupt signal INT follows the condition of Timer Flag âTFâ
(bit 1 in register Control_INT Flag), the INT signal can be cleared by clearing the âTFâ = â0â.
Control of the Countdown Timer Functions (address 00hâ¦bits description)
Address
Function
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3 Bit 2
00h
Control_1
Clk/Int TD1
TD0 SROn EERE TAR
Bit
Symbol
6
TD1
5
TD0
2
TAR
1
TE
Value
00
01
10
11
0
1
0
1
Description
Timer Source Clock Frequency: 32 Hz
Timer Source Clock Frequency: 8 Hz
Timer Source Clock Frequency: 1 Hz
Timer Source Clock Frequency : 0.5 Hz
Disables Countdown Timer Auto-Reload mode
Enables Countdown Timer Auto-Reload mode
Disables Countdown Timer
Enables Countdown Timer
Bit 1
TE
Bit 0
WE
The Timer Source Clock Frequency âTD0â & âTD1â and the Timer Auto Reload mode âTARâ can only be written
when the Timer is stopped by âTEâ = â0â (bit 1 in register Control_1).
The Countdown Timer values in âTimer Lowâ and âTimer Highâ can only be written when the Timer is stopped by
âTEâ = â0â and Timer Auto Reload mode is disabled âTARâ = â0â.
Register Countdown Timer (addresses 18h / 19hâ¦bits description)
Register 18h is loaded with the low byte of the 16-bit Countdown Timer value ,nâ
Register 19h is loaded with the high byte of the 16-bit Countdown Timer value ,nâ
Address
18h
19h
Bit
18h
19h
Function
Timer Low
Timer High
Symbol
Timer Low
Timer High
Bit 7
128
128
Bit 6
64
64
Value
xx01 to xxFF
00xx to FFxx
Bit 5
32
32
Bit 4
16
16
Bit 3
8
8
Bit 2
4
4
Bit 1
2
2
Description
Countdown value = n
Countdown period
=
n
Source Clock Frequency
Bit 0
1
1
29/67
|
▷ |