Renesas M16C/64A Series User Manual page 418

Table of Contents

Advertisement

M16C/64A Group
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.
Time data
Compare data
(when 0:01:23:45)
Values of RTCPM, RTCHR, RTCMIN, RTCSEC and count operation
Compare match
interrupt request
generated
Values of RTCPM, RTCHR, RTCMIN, RTCSEC
The above assumes the following:
The H12H24 bit in the RTCCR1 register is 0 (12-hour mode).
Bits SEIE, MNIE, and HRIE in the RTCCR2 register are 1.
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
Figure 20.6
Difference between Compare Modes
R01UH0136EJ0210 Rev.2.10
Jul 31, 2012
RTCHR
RTCPM
Compare
Compare
RTCCHR
PMCMP
01
0
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
0 : 01 : 23 : 43
RTCMIN
RTCSEC
Compare
RTCCMIN
RTCCSEC
23
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.
20. Real-Time Clock
Controlled using bits
SEIE, MNIE, and
Compare
HRIE in the
RTCCR2 register.
45
Compare Mode 3
:
0 : 01 : 23 : 43
Time
0 : 01 : 23 : 44
(change
0 : 00 : 00 : 00
every second)
0 : 00 : 00 : 00
0 : 00 : 00 : 00
:
The value is set back to
the reset value and
counting stops.
Page 385 of 800

Advertisement

Table of Contents
loading

Table of Contents