R01UH0092EJ0110 Rev.1.10
Page 387 of 807
Jul 31, 2012
M16C/64C Group
20. Real-Time Clock
Figure 20.6 shows Difference between Compare Modes, Figure 20.7 shows Count Start/Stop Operating
Example, Figure 20.8 shows Compare Mode 1 Operating Example, Figure 20.9 shows Compare Mode
2 Operating Example, and Figure 20.10 shows Compare Mode 3 Operating Example.
Figure 20.6
Difference between Compare Modes
Compare data
(when 0:01:23:45)
RTCCMIN
01
23
RTCCHR
PMCMP
Compare Mode 1
:
0 : 01 : 23 : 43
0 : 01 : 23 : 44
0 : 01 : 23 : 45
0 : 01 : 23 : 46
0 : 01 : 23 : 47
:
Continue counting
Compare Mode 2
:
0 : 01 : 23 : 43
0 : 01 : 23 : 44
0 : 00 : 00 : 00
0 : 00 : 00 : 01
0 : 00 : 00 : 02
:
The value is set back to
the reset value and
counting continues.
Compare Mode 3
:
0 : 01 : 23 : 43
0 : 01 : 23 : 44
0 : 00 : 00 : 00
0 : 00 : 00 : 00
0 : 00 : 00 : 00
:
The value is set back to
the reset value and
counting stops.
Compare match
interrupt request
generated
RTCMIN
RTCHR
RTCPM
Compare
Compare
Compare
Values of RTCPM, RTCHR, RTCMIN, RTCSEC and count operation
0 : 01 : 23 : 43
Values of RTCPM, RTCHR, RTCMIN, RTCSEC
Time data
Controlled using bits
SEIE, MNIE, and
HRIE in the
RTCCR2 register.
Time
(change
every second)
RTCCSEC
45
RTCSEC
Compare
RTCPM
: RTCPM bit in RTCCR1 register
RTCHR
: Bits HR11 to HR10 and HR03 to HR00 in RTCHR register
RTCMIN
: Bits MN12 to MN10 and MN03 to MN00 in RTCMIN register
RTCSEC
: Bits SC12 to SC10 and SC03 to SC00 in RTCSEC register
PMCMP
: PMCMP bit in RTCCHR register
RTCCHR
: Bits HCMP11 to HCMP10 and HCMP03 to HCMP00 in RTCCHR register
RTCCMIN : Bits MCMP12 to MCMP10 and MCMP03 to MCMP00 in RTCCMIN register
RTCCSEC : Bits SCMP12 to SCMP10 and SCMP03 to SCMP00 in RTCCSEC register
0
The above assumes the following:
y
The H12H24 bit in the RTCCR1 register is 0 (12-hour mode).
y
Bits SEIE, MNIE, and HRIE in the RTCCR2 register are 1.
Summary of Contents for M16C Series
Page 846: ...M16C 64C Group R01UH0092EJ0110...