R01UH0136EJ0210 Rev.2.10
Page 383 of 800
Jul 31, 2012
M16C/64A Group
20. Real-Time Clock
Figure 20.5
Time and Day Change Procedure (Compare Mode 2 or Compare Mode 3)
Stop real-time clock operation
(not necessary when count is stopped
or in compare mode 3)
TCSTF bit in
RTCCR1 register = 0?
TSTART bit
in RTCCR1 register
←
0
Setting of RTCCSR register
Setting of H12H24 bit
in the RTCCR1 register
Setting of RTCCR2 register
TSTART bit
in RTCCR1 register
←
1
TCSTF bit in
RTCCR1 register = 1?
RTCTIC register
←
00h
RTCCIC register
←
00h
Setting of registers RTCTIC and RTCCIC
(IR bit
←
0, select interrupt priority level)
Select interrupt source
Start real-time clock operation
Confirmation of
RTCPM bit in RTCCR1 register
and registers RTCSEC, RTCMIN,
RTCHR, and RTCWK
OK
NG
Select clock source
Set 12-hour/24-hour operating mode
Set second, minute, hour, day, a.m./p.m.
(1)
No
(count stopped)
Yes (counting)
Disable real-time clock periodic interrupt
Disable real-time clock compare interrupt
Yes (count stopped)
No
(counting)
Note:
1. One cycle of the count source is sometimes necessary to write a
correct value after compare match.
Time and day change
End
Setting of registers RTCSEC,
RTCMIN, RTCHR, and RTCWK
Setting of RTCPM bit
in the RTCCR1 register
Содержание M16C/60 Series
Страница 853: ...M16C 64A Group R01UH0136EJ0210...