R01UH0092EJ0110 Rev.1.10
Page 384 of 807
Jul 31, 2012
M16C/64C Group
20. Real-Time Clock
Figure 20.4
Time and Day Change Procedure (No Compare Mode or Compare Mode 1)
Stop real-time clock operation
(not necessary when count is stopped)
TCSTF bit in
RTCCR1 register = 0?
TSTART bit
in RTCCR1 register
←
0
Setting of RTCCSR register
Setting of H12H24 bit
in RTCCR1 register
Setting of registers RTCSEC,
RTCMIN, RTCHR, and RTCWK
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)
Set second, minute, hour, day
Select interrupt source
Start real-time clock operation
No
(count stopped)
Select clock source
Set 12-hour/24-hour operating mode
Yes (counting)
No
(counting)
Yes (count stopped)
Disable real-time clock periodic interrupt
Disable real-time clock compare interrupt
End
Time and day change
Setting of RTCPM bit
in RTCCR1 register
Set a.m./p.m.
Summary of Contents for M16C Series
Page 846: ...M16C 64C Group R01UH0092EJ0110...