Download Print this page

Renesas M16C/50 Series User Manual page 458

Advertisement

M16C/5L Group, M16C/56 Group
Time and day change
in RTCCR1 register ← 0
RTCCR1 register = 0?
RTCTIC register ← 00h
RTCCIC register ← 00h
Setting of RTCCSR register
Setting of H12H24 bit
in the RTCCR1 register
Setting of registers RTCSEC,
RTCMIN, RTCHR, and RTCWK
Setting of RTCPM bit
in the RTCCR1 register
RTCPM bit in RTCCR1 register
and registers RTCSEC, RTCMIN,
RTCHR, and RTCWK
Setting of RTCCR2 register
Setting of registers RTCTIC and RTCCIC
(IR bit ← 0, select interrupt priority level)
in RTCCR1 register ← 1
RTCCR1 register = 1?
Note:
1. One cycle of the count source is sometimes necessary to write a
correct value after compare match.
Figure 20.5
Time and Day Change Procedure (Compare Mode 2 or Compare Mode 3)
R01UH0127EJ0110 Rev.1.10
Sep 01, 2011
TSTART bit
No
(counting)
TCSTF bit in
Yes (count stopped)
Confirmation of
OK
TSTART bit
No
(count stopped)
TCSTF bit in
Yes (counting)
End
Stop real-time clock operation
(not necessary when count is stopped
or in compare mode 3)
Disable real-time clock periodic interrupt
Disable real-time clock compare interrupt
Select clock source
Set 12-hour/24-hour operating mode
Set second, minute, hour, day, a.m./p.m.
NG
Select interrupt source
Start real-time clock operation
20. Real-Time Clock
(1)
Page 421 of 803

Advertisement

loading