9 REAL-TIME CLOCK (RTCA)
S1C17M20/M21/M22/M23/M24/M25
Seiko Epson Corporation
9-1
TECHNICAL MANUAL (Rev. 1.0)
9 Real-Time Clock (RTCA)
9.1 Overview
RTCA is a real-time clock with a perpetual calendar function. The main features of RTCA are outlined below.
• Includes a BCD real-time clock counter to implement a time-of-day clock (second, minute, and hour) and calen-
dar (day, day of the week, month, and year with leap year supported).
• Provides a hold function for reading correct counter values by suspending the real-time clock counter operation.
• 24-hour or 12-hour mode is selectable.
• Capable of controlling the starting and stopping of the time-of-day clock.
• Provides a 30-second correction function to adjust time using a time signal.
• Includes a 1 Hz counter to count 128 to 1 Hz.
• Includes a BCD stopwatch counter with 1/100-second counting supported.
• Provides a theoretical regulation function to correct clock error due to frequency tolerance with no external parts
required.
Figure 9.1.1 shows the configuration of RTCA.
RTCA
f
OSC1
1-second
signal
RTC
count
control
circuit
Comparator
OSC1
oscillator
1/128
128
Hz
RTCTRM[6:0]
RTC
128HZ
64
Hz
RTC
64HZ
32
Hz
RTC
32HZ
16
Hz
RTC
16HZ
8
Hz
RTC
8HZ
4
Hz
RTC
4HZ
2
Hz
RTC
2HZ
1
Hz
RTC
1HZ
Clock generator
Interrupt controller
RTCTRMBSY
RTCHLD
RTC24H
RTCADJ
Stopwatch
count
control
circuit
Interrupt
control
circuit
SWRST
SWRUN
SW1IE
SW10IE
SW100IE
ALARMIE
1DAYIE
1HURIE
1MINIE
1SECIE
1_2SECIE
1_4SECIE
1_8SECIE
1_32SECIE
SW1IF
SW10IF
SW100IF
ALARMIF
1DAYIF
1HURIF
1MINIF
1SECIF
1_2SECIF
1_4SECIF
1_8SECIF
1_32SECIF
RTCRST
RTCRUN
RTCWK[2:0]
RTCYH[3:0]
/RTCYL[3:0]
RTCMOH
/RTCMOL[3:0]
RTCDH[1:0]
/RTCDL[3:0]
RTCAP
RTCHH[1:0]
/RTCHL[3:0]
RTCMIH[2:0]
/RTCMIL[3:0]
RTCSH[2:0]
/RTCSL[3:0]
RTCAPA
RTCHHA[1:0]
/RTCHLA[3:0]
RTCMIHA[2:0]
/RTCMILA[3:0]
RTCSHA[2:0]
/RTCSLA[3:0]
RTCBSY
Day of
week
Year
Month
Day
A.M./
P.M.
Hour
Minute
Second
1 Hz counter
1/100
s
BCD
100[3:0]
1/10
s
BCD
10[3:0]
Stopwatch counter
Stopwatch counter interrupt
1 Hz counter interrupt
Alarm interrupt
Real-time clock counter interrupt
Real-time
clock
counter
RTC1S
Inter
nal data
bu
s
Figure 9.1.1 RTCA Configuration
9.2 Output Pin and External Connection
9.2.1 Output Pin
Table 9.2.1.1 shows the RTCA pin.
Table 9.2.1.1 RTCA Pin
Pin name
I/O
*
Initial status
*
Function
RTC1S
O
O (L)
1-second signal monitor output pin
*
Indicates the status when the pin is configured for RTCA.
If the port is shared with the RTCA output function and other functions, the RTCA function must be assigned to the
port. For more information, refer to the “I/O Ports” chapter.