English
Language : 

SH7750_08 Datasheet, PDF (413/1162 Pages) Renesas Technology Corp – 32-Bit RISC Microcomputer
11.3 Operation
Examples of the use of the RTC are shown below.
Section 11 Realtime Clock (RTC)
11.3.1 Time Setting Procedures
Figure 11.2 shows examples of the time setting procedures.
Stop clock
Reset frequency divider
Set RCR2.RESET to 1
Clear RCR2.START to 0
Set second/minute/hour/day/
day-of-week/month/year
In any order
Start clock operation
Set RCR2.START to 1
(a) Setting time after stopping clock
Clear carry flag
Write to counter register
Clear RCR1.CF to 0
(Write 1 to RCR1.AF so that alarm flag
is not cleared)
Set RYRCNT first and RSECCNT last
Yes
Carry flag = 1?
No
Read RCR1 register and check CF bit
(b) Setting time while clock is running
Figure 11.2 Examples of Time Setting Procedures
The procedure for setting the time after stopping the clock is shown in (a). The programming for
this method is simple, and it is useful for setting all the counters, from second to year.
Rev.7.00 Oct. 10, 2008 Page 329 of 1074
REJ09B0366-0700