RX230 Group, RX231 Group
Initial Settings and Usage Procedure of RTC Battery Backup Function
R01AN4831EJ0100 Rev.1.00
Page 4 of 23
Aug.20.19
1. Overview
1.1 About this Application Note
The battery backup function uses a dedicated battery backup power supply (VBATT) to ensure that the
RTC
’s clock function continues to operate even if the VCC power supply is interrupted. In the operation
example described below, time information from the RTC is displayed on an LCD panel, allowing
confirmation that the RTC continues to operate when in the battery backup state.
The operating conditions of the sample program are described in (1) to (6) below, and the VCC and VBATT
states are listed in Table 1.1.
Figure 1.1 Battery Backup Function
(1) Power-on (VCC on and VBATT on)
The RTC operates, and time information is displayed on the LCD.
(2) Automatic switch to VBATT at VCC drop (VCC on
→
off, VBATT on)
When the VCC power supply drops below the monitoring voltage (3.10V), the time information and switch
(connected to P34 pin) press count are stored in the data flash.
When the VCC power supply drops still further and reaches VDETBATT ±0.1 V (typ.), the power supply of
the RTC sub-clock switches automatically to the VBATT power supply. The LCD that displays the time
information goes blank.
(3) VBATT voltage drop detection (VCC off, VBATT on)
During battery backup, RTC operation continues. Dung this period, if battery voltage drops below 1.8V,
RTC operation is not guaranteed and VBATRLVDETF bit set to 1. By checking this bit, we can confirm
whether VBAT voltage dropped below 1.8V.
Also, time information is captured using the RTCIC1 pin (rising-edge input).
(4) VCC recovery (VCC off
→
on, VBATT on)
When VCC recovers to VD ±0.1 V (typ.), use of the VCC power supply resumes.
VBATTSR.VBATRLVDETF is checked. If the value is 1, VBATT is determined to be less than 1.8 V and
the RTC is initialized.
(5) Power supply recovery (VCC on, VBATT on)
If VBATT hasn’t dropped below 1.8V, after VCC recovery, the elapsed time is updated, and the latest time
information is displayed on the LCD.
(6) VBATT pin voltage monitor function (VCC on, VBATT on
→
off)
When VBATT is less than Vdetvbt (is set to 2.2 V), a VBATT pin voltage drop detection interrupt is
generated and a voltage drop alert is displayed on the LCD.
Sub Clock Circuit
RTC
RTC Regulator
VDETBATT
VBATT Voltage Monitor
VBATT Volt. Drop Detection
PORT
P34
Battery
Backup
Function
VCC
VBATT
RTCIC1
Voltage Monitoring 1
Switch
Switch
Vcc
VBATT
(1)
(2)
VDETBATT
(3)
VDETBATT
(4)
(5)
(6)