Datasheet

Section 11 Realtime Clock (RTC)
Rev.7.00 Dec. 24, 2008 Page 360 of 698
REJ09B0074-0700
11.5 Interrupt Source
The RTC interrupt sources are listed in table 11.2. There are five kinds of RTC interrupts: week
interrupts, day interrupts, hour interrupts, minute interrupts, and second interrupts.
When using an interrupt, initiate the RTC last after other registers (include ISCRH and IER of
interrupt controller) are set. Do not set multiple interrupt enable bits in RTCCR2 simultaneously
to 1.
When an interrupt request of the RTC occurs, the IRQ5F flag in ISR is set to 1. When clearing the
flag, write 0 after reading the flag = 1.
Figure 11.5 shows the initializing setting procedure in using the RTC interrupt and figure 11.6
shows an example of the RTC interrupt handling routine.
Table 11.2 Interrupt Source
Interrupt Name Interrupt Source Interrupt Enable Bit
Overflow interrupt Occurs when the free running counter is
overflown.
FOIE
Week periodic interrupt Occurs every week when the day-of-week
date register value becomes 0.
WKIE
Day periodic interrupt Occurs every day when the day-of-week date
register is counted.
DYIE
Hour periodic interrupt Occurs every hour when the hour date
register is counted.
HRIE
Minute periodic interrupt Occurs every minute when the minute date
register is counted.
MNIE
Second periodic interrupt Occurs every second when the second date
register is counted.
SEIE