RL78/G13 CHAPTER 7 REAL-TIME CLOCK
R01UH0146EJ0100 Rev.1.00 431
Sep 22, 2011
CHAPTER 7 REAL-TIME CLOCK
7.1 Functions of Real-time Clock
The real-time clock has the following features.
• Having counters of year, month, week, day, hour, minute, and second, and can count up to 99 years.
• Constant-period interrupt function (period: 0.5 seconds, 1 second, 1 minute, 1 hour, 1 day, 1 month)
• Alarm interrupt function (alarm: week, hour, minute)
• Pin output function of 1 Hz (40, 44, 48, 52, 64, 80, 100, and 128-pin products only)
Caution The count of year, month, week, day, hour, minutes and second can only be performed when a
subsystem clock (f
SUB = 32.768 kHz) is selected as the operation clock of the real-time clock.
When the low-speed oscillation clock (f
IL) is selected, only the constant-period interrupt
function is available. The 20- to 36-pin products have the constant-period interrupt function
only, because these products have no subsystem clock.
However, the constant-period interrupt interval when f
IL is selected will be calculated with the
constant-period (the value selected with RTCC0 register) × f
SUB/fIL.
7.2 Configuration of Real-time Clock
The real-time clock includes the following hardware.
Table 7-1. Configuration of Real-time Clock
Item Configuration
Counter Sub-count register
Peripheral enable register 0 (PER0)
Operation speed mode control register (OSMC)
Real-time clock control register 0 (RTCC0)
Real-time clock control register 1 (RTCC1)
Second count register (SEC)
Minute count register (MIN)
Hour count register (HOUR)
Day count register (DAY)
Week count register (WEEK)
Month count register (MONTH)
Year count register (YEAR)
Watch error correction register (SUBCUD)
Alarm minute register (ALARMWM)
Alarm hour register (ALARMWH)
Control registers
Alarm week register (ALARMWW)
<R>