R01UH0092EJ0110 Rev.1.10
Page 390 of 807
Jul 31, 2012
M16C/64C Group
20. Real-Time Clock
Figure 20.9
Compare Mode 2 Operating Example
BSY bit
1 s
TCSTF bit in the
RTCCR1 register 1
RTCSEC
Compare match
Continue counting
Set back to the reset value
44
0
23
1
RTCMIN
RTCHR
0
0
IR bit in the
RTCCIC register
IR bit in the
RTCTIC register
RTCOUT pin
output
Output polarity inverted
Set to 0 by accepting an interrupt request, or by
a program.
y
The TOENA bit in the RTCCR1 register is 1 (compare output enabled).
y
Bits RTCCMP1 to RTCCMP0 in the RTCCR2 register are 10b (compare mode 2).
y
Bits SEIE, MNIE, and HRIE in the RTCCR2 register are 1 (compare by seconds, minutes, and hours.
Interrupt enabled).
y
Bits SCMP12 to SCMP10 and SCMP03 to SCMP00 in the RTCCSEC register are 4 and 5,
respectively (second setting: 45).
Bits MCMP12 to MCMP10 and MCMP03 to MCMP00 in the RTCCMIN register are 2 and 3,
respectively (minute setting: 23).
Bits HCMP11 to HCMP10 and HCMP03 to HCMP00 in the RTCCHR register are 0 and 1, respectively
(hour setting: 1).
The PMCMP bit in the RTCCHR register is 0 (a.m.).
1
0
RTCPM bit
0
BSY bit
: Bit in RTCSEC register
RTCSEC
: Bits SC12 to SC10 and SC03 to SC00 in RTCSEC register
RTCMIN
: Bits MN12 to MN10 and MN03 to MN00 in RTCMIN register
RTCHR
: Bits HR11 to HR10 and HR03 to HR00 in RTCHR register
RTCPM bit
: Bit in RTCCR1 register
Un-
defined
Undefined
Undefined
Undefined
The above assumes the following:
Undefined
Summary of Contents for M16C Series
Page 846: ...M16C 64C Group R01UH0092EJ0110...