8 Real-TiMe ClOCK (RTC)
8-2
Seiko epson Corporation
S1C17624/604/622/602/621 TeChniCal Manual
RTC Counters
8.2
The RTC contains the following 13 counters, whose count values can be read out as BCD data from the respective
registers. Each counter can also be set to any desired date and time by writing data to the respective register.
1-second counter
This 4-bit BCD counter counts in units of seconds. It counts from 0 to 9 synchronously with a 1-second signal
derived from the 32.768-kHz OSC1 clock by dividing the clock into smaller frequencies. This counter is reset
to 0 after 9 and outputs a carry over of 1 to the 10-second counter. The count data is read out and written using
RTCSL[3:0]/RTC_SEC register.
10-second counter
This 3-bit BCD counter counts tens of seconds. It counts from 0 to 5 with 1 carried over from the 1-second
counter. This counter is reset to 0 after 5 and outputs a carry over of 1 to the 1-minute counter. The count data is
read out and written using RTCSH[2:0]/RTC_SEC register.
1-minute counter
This 4-bit BCD counter counts in units of minutes. It counts from 0 to 9 with 1 carried over from the 10-second
counter. This counter is reset to 0 after 9 and outputs a carry over of 1 to the 10-minute counter. The count data
is read out and written using RTCMIL[3:0]/RTC_MIN register.
10-minute counter
This 3-bit BCD counter counts tens of minutes. It counts from 0 to 5 with 1 carried over from the 1-minute
counter. This counter is reset to 0 after 5 and outputs a carry over of 1 to the 1-hour counter. The count data is
read out and written using RTCMIH[2:0]/RTC_MIN register.
1-hour counter
This 4-bit BCD counter counts in units of hours. It counts from 0 to 9 with 1 carried over from the 10-min-
ute counter. This counter is reset to 0 after 9 and outputs a carry over of 1 to the 10-hour counter. Depending
whether 12-hour or 24-hour mode is selected, the counter is reset at 12 o’clock or 24 o’clock. The count data is
read out and written using RTCHL[3:0]/RTC_HOUR register.
10-hour counter
This 2-bit BCD counter counts tens of hours. With a carry over of 1 from the 1-hour counter, this counter
counts from 0 to 1 (when 12-hour mode is selected) or from 0 to 2 (when 24-hour mode is selected). The coun-
ter is reset at 12 o’clock or 24 o’clock, and outputs a carry over of 1 to the 1-day counter. The count data is read
out and written using RTCHH[1:0]/RTC_HOUR register.
When 12-hour mode is selected, RTCAP/RTC_HOUR register that indicates A.M. or P.M. is enabled, with A.M.
and P.M. represented by 0 and 1, respectively. For 24-hour mode, RTCAP is fixed to 0.
1-day counter
This 4-bit BCD counter counts in units of days. It counts from 0 to 9 with 1 carried over from the hour counter.
This counter is reset to 0 after 9 and outputs a carry over of 1 to the 10-day counter. The number of days in each
month and leap years are taken into account, so that the counter is reset to 1 when months change. The count
data is read out and written using RTCDL[3:0]/RTC_DAY register.
10-day counter
This 2-bit BCD counter counts tens of days. It counts from 0 to 2 or 3 with 1 carried over from the 1-day coun-
ter. The number of days in each month and leap years are taken into account, so that when months change the
counter is reset to 0 along with the 1-day counter, and outputs a carry over of 1 to the 1-month counter. The
count data is read out and written using RTCDH[1:0]/RTC_DAY register.