Section 20 Realtime Clock (RTC)
Rev.1.00 Dec. 13, 2005 Page 728 of 1286
REJ09B0158-0100
20.4.2
Time Reading Procedures
Figure 20.3 shows examples of the time reading procedures.
No
No
Yes
Yes
No
No
Yes
Yes
(a) Reading time without using interrupts
(b) Reading time using interrupts
Clear RCR1.CF to 0
(Write 1 to RCR1.AF so that alarm flag
is not cleared).
Clear RCR1.CIE to 0.
Clear RCR1.CF to 0
(Write 1 to RCR1.AF so that alarm flag
is not cleared).
Set RCR1.CIE to 1.
Clear RCR1.CIE to 0.
Note:
*
When H'59 is read out from the second counter register, that
should be changed to H'00 and the read out value of the minute
counter register should be added to 1 as a carry processing.
The hour counter, day-of-week, day, month, and year counters
may be necessary to do carry processing.
Read RCR1 register and check CF bit.
Clear carry flag
Read counter register
Disable carry interrupts
Clear carry flag
Enable carry interrupts
Interrupt generated?
Clear carry flag
Disable carry interrupts
Read counter register
CRF = 1?
CRF = 1?
Add 1 (second) to the second
counter register value that is
read out
*
Add 1 (second) to the second
counter register value that is
read out
*
CF = 1?
Figure 20.3 Examples of Time Reading Procedures
Summary of Contents for SH7780 Series
Page 2: ...Rev 1 00 Dec 13 2005 Page ii of l ...
Page 28: ...Rev 1 00 Dec 13 2005 Page xxviii of l ...
Page 50: ...Rev 1 00 Dec 13 2005 Page l of l ...
Page 82: ...Section 1 Overview Rev 1 00 Dec 13 2005 Page 32 of 1286 REJ09B0158 0100 ...
Page 122: ...Section 3 Instruction Set Rev 1 00 Dec 13 2005 Page 72 of 1286 REJ09B0158 0100 ...
Page 146: ...Section 4 Pipelining Rev 1 00 Dec 13 2005 Page 96 of 1286 REJ09B0158 0100 ...
Page 196: ...Section 6 Floating Point Unit FPU Rev 1 00 Dec 13 2005 Page 146 of 1286 REJ09B0158 0100 ...
Page 292: ...Section 9 L Memory Rev 1 00 Dec 13 2005 Page 242 of 1286 REJ09B0158 0100 ...
Page 492: ...Section 12 DDR SDRAM Interface DDRIF Rev 1 00 Dec 13 2005 Page 442 of 1286 REJ09B0158 0100 ...
Page 674: ...Section 15 Clock Pulse Generator CPG Rev 1 00 Dec 13 2005 Page 624 of 1286 REJ09B0158 0100 ...
Page 692: ...Section 16 Watchdog Timer and Reset Rev 1 00 Dec 13 2005 Page 642 of 1286 REJ09B0158 0100 ...
Page 726: ...Section 18 Timer Unit TMU Rev 1 00 Dec 13 2005 Page 676 of 1286 REJ09B0158 0100 ...
Page 1032: ...Section 25 Audio Codec Interface HAC Rev 1 00 Dec 13 2005 Page 982 of 1286 REJ09B0158 0100 ...
Page 1150: ...Section 28 General Purpose I O GPIO Rev 1 00 Dec 13 2005 Page 1100 of 1286 REJ09B0158 0100 ...
Page 1184: ...Section 29 User Break Controller UBC Rev 1 00 Dec 13 2005 Page 1134 of 1286 REJ09B0158 0100 ...
Page 1266: ...Section 31 Electrical Characteristics Rev 1 00 Dec 13 2005 Page 1216 of 1286 REJ09B0158 0100 ...
Page 1328: ...Appendix Rev 1 00 Dec 13 2005 Page 1278 of 1286 REJ09B0158 0100 ...
Page 1336: ...Rev 1 00 Dec 13 2005 Page 1286 of 1286 REJ09B0158 0100 ...
Page 1339: ......
Page 1340: ...SH7780 Hardware Manual ...