English
Language : 

UPD78F1502AGK-GAK-AX Datasheet, PDF (378/1031 Pages) Renesas Technology Corp – 16-Bit Single-Chip Microcontrollers
78K0R/Lx3
CHAPTER 7 REAL-TIME COUNTER
7.4 Real-Time Counter Operation
7.4.1 Starting operation of real-time counter
Figure 7-19. Procedure for Starting Operation of Real-Time Counter
Start
RTCEN = 1Note1
Supplies input clock.
RTCE = 0
Stops counter operation.
Setting AMPM, CT2 to CT0 Selects 12-/24-hour system and interrupt (INTRTC).
Setting SEC (clearing RSUBC) Sets second count register.
Setting MIN
Sets minute count register.
Setting HOUR
Sets hour count register.
Setting WEEK
Sets week count register.
Setting DAY
Sets day count register.
Setting MONTH
Sets month count register.
Setting YEAR
Sets year count register.
Clearing IF flags of interrupt Clears interrupt request flags (RTCIF, RTCIIF).
Clearing MK flags of interrupt Clears interrupt mask flags (RTCMK, RTCIMK).
RTCE = 1Note2
Starts counter operation.
No
INTRTC = 1?
Yes
Reading counter
Notes 1.
2.
First set RTCEN to 1, while oscillation of the subsystem clock (fSUB) is stable.
Confirm the procedure described in 7.4.2 Shifting to STOP mode after starting operation when shifting
to STOP mode without waiting for INTRTC = 1 after RTCE = 1.
R01UH0004EJ0501 Rev.5.01
362
Jun 20, 2011