R8C/38T-A Group
18. Timer RE2
Under development Preliminary document
Specifications in this document are tentative and subject to change.
R01UH0241EJ0010 Rev.0.10
Page 327 of 730
Aug 05, 2011
18. Timer RE2
18.1
Overview
Timer RE2 includes a 3-bit counter, a 4-bit counter, and an 8-bit counter.
Timer RE2 supports the following two modes:
Real-time clock mode
A one-second signal is generated from the fC1 clock and used to count seconds, minutes, hours, days of the week,
days, months, and years (supporting leap years from 2000 to 2099).
Compare match timer mode
A count source is counted and compare matches are detected.
Table 18.1
Real-Time Clock Mode Specifications
Item
Description
Count source
fC1 (32 kHz)
Count
Starting or stopping the count can be selected.
Reset
Reset by the RTCRST bit in the TRECR register
Interrupts
Periodic interrupt
One of the following is selected:
- 0.25 seconds
- 0.5 seconds
- 1 second
-Minute
-Hour
-Day
- Month
-Year
Alarm interrupt
TMRE2O pin functions
Either of the following is selected:
Programmable I/O port
Output of f4, f8, f16, f32, 1 Hz, 64 Hz, or fC1
Read from and write to timer
The values of the timer RE2 data registers (TRESEC, TREMIN, TREHR, TREWK,
TREDY, TREMON, and TREYR) other than the TREWK register are represented by
the BCD code.
Selectable functions
Second adjustment function
Reset adjustment function and 30-second adjustment function
Clock error correction function
The standby state can be set for the module only.
Table 18.2
Compare Match Timer Mode Specifications
Item
Description
Count sources
f8, f32, f128, f256, f512, f2048, f4096, f8192
Count
Starting or stopping the count can be selected.
Reset
Reset by the RTCRST bit in the TRECR register
Interrupts
Compare match interrupt
Overflow interrupt
TMRE2O pin functions
Either of the following is selected:
Programmable I/O port
Output of f4, f8, f16, f32, or 64 Hz
Output toggled at every compare match
The standby state can be set for the module only.