8 REAL-TIME CLOCK (RTC)
S1C33L26 TECHNICAL MANUAL
Seiko Epson Corporation
8-13
To generate an RTC interrupt or use an RTC interrupt request signal to turn off SLEEP mode, set this
bit to 1. When this bit is 0, no interrupts are generated and SLEEP mode cannot be turned off.
Note: The value of RTCIEN is indeterminate after power-on, and not initialized to 0 by initial reset. To
prevent the occurrence of unwanted RTC interrupts, be sure to clear this bit in software after
power-on and initial reset.
RTC Control 0 Register (RTC_CNTL0)
Register name Address
Bit
Name
Function
Setting
Init. R/W
Remarks
RTC Control 0
Register
(RTC_CNTL0)
0x300a02
(8 bits)
D7–5 –
reserved
–
–
–
0 when being read.
D4
RTC24H
24H/12H mode select
1 24H
0 12H
X (0) R/W
D3
–
reserved
–
–
–
0 when being read.
D2
RTCADJ
30-second adjustment
1 Adjust
0 –
X (0) R/W
D1
RTCSTP
Divider run/stop control
1 Stop
0 Run
X (0) R/W
D0
RTCRST
Software reset
1 Reset
0 –
X (0) R/W
Init.: ( ) indicates the value set after a software reset (RTCRST
→
1
→
0) is performed.
D[7:5]
Reserved
D4
RTC24H: 24H/12H Mode Select Bit
This bit selects whether to use the hour counter in 24-hour or 12-hour mode.
1 (R/W): 24-hour mode
0 (R/W): 12-hour mode (software reset value)
The count range of hour counters changes with this selection. Basically, this setting should be changed
while the counters are idle. Since this register is assigned a control bit (D1) to start the counters, 12-
hour or 24-hour mode may be selected when starting the counters.
Note: Rewriting RTC24H may corrupt the count data for hours, days, months, years, or days of the
week. Therefore, after changing the RTC24H setting, be sure to set data back in these coun-
ters again.
D3
Reserved
D2
RTCADJ: 30-second Adjustment Bit
This bit executes 30-second correction.
1 (W):
Execute 30-second correction
0 (W):
Has no effect
1 (R):
30-second correction being executed
0 (R):
30-second correction completed (not being executed) (software reset value)
The description “30-second correction” means adding 1 to the minutes when seconds of the time clock
are in the 30-to-59 second range, and doing nothing in the 0-to-29 second range. This function may be
used to round up seconds to minutes when resetting seconds in an application.
Writing 1 to this bit causes the RTC to operate as follows:
• When the 10-second counter is 3 or more, the RTC generates a carry over of 1 to start counting by
the 1-minute counter.
• When the 10-second counter is 2 or less, the RTC does not generate a carry over of 1.
After being set to 1, this bit remains set for the 4-ms period needed for the processing above, then is au-
tomatically reset to 0.
Note: Accessing the counters while RTCADJ = 1 is prohibited. Writing 0 to this bit during such time
is also prohibited, because it would cause the RTC to operate erratically.
D1
RTCSTP: Divider Run/Stop Control Bit
This bit starts or stops the divider. It also indicates divider operating status.
1 (W):
Stops divider
0 (W):
Starts divider
1 (R):
Divider/counters are idle
0 (R):
Divider/counters are operating (software reset value)