Rev. 3.0, 04/02, page 281 of 1064
11.3
Operation
Examples of the use of the RTC are shown below.
11.3.1
Time Setting Procedures
Figure 11.2 shows examples of the time setting procedures.
Stop clock
Reset frequency divider
Set second/minute/hour/day/
day-of-week/month/year
Start clock operation
Set RCR2.RESET to 1
Clear RCR2.START to 0
In any order
Set RCR2.START to 1
(a) Setting time after stopping clock
Clear carry flag
Write to counter register
Carry flag = 1?
No
Yes
Clear RCR1.CF to 0
(Write 1 to RCR1.AF so that alarm flag
is not cleared)
Set RYRCNT first and RSECCNT last
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 figure 11.2 (a). The
programming for this method is simple, and it is useful for setting all the counters, from second to
year.
Summary of Contents for SH7751
Page 39: ...Rev 3 0 04 02 page xxxviii of xxxviii ...
Page 89: ...Rev 3 0 04 02 page 50 of 1064 ...
Page 157: ...Rev 3 0 04 02 page 118 of 1064 ...
Page 193: ...Rev 3 0 04 02 page 154 of 1064 ...
Page 225: ...Rev 3 0 04 02 page 186 of 1064 ...
Page 253: ...Rev 3 0 04 02 page 214 of 1064 ...
Page 301: ...Rev 3 0 04 02 page 262 of 1064 ...
Page 343: ...Rev 3 0 04 02 page 304 of 1064 ...
Page 607: ...Rev 3 0 04 02 page 568 of 1064 ...
Page 671: ...Rev 3 0 04 02 page 632 of 1064 ...
Page 745: ...Rev 3 0 04 02 page 706 of 1064 ...
Page 767: ...Rev 3 0 04 02 page 728 of 1064 ...
Page 1061: ...Rev 3 0 04 02 page 1022 of 1064 NMI tNMIL tNMIH Figure 23 69 NMI Input Timing ...
Page 1069: ...Rev 3 0 04 02 page 1030 of 1064 ...
Page 1103: ...Rev 3 0 04 02 page 1064 of 1064 ...