8 REAL-TIME CLOCK (RTC)
S1C33L26 TECHNICAL MANUAL
Seiko Epson Corporation
8-3
1-month counter
This 4-bit BCD counter counts in units of months. It counts from 0 to 9 with 1 carried over from the day coun-
ter. This counter is reset to 0 after 9 and outputs a carry over of 1 to the 10-month counter. The counter is reset
to 1 when years change. The count data is read out and written using RTCMOL[3:0]/RTC_MONTH register.
10-month counter
This counter counts in units of 10 months, and is set to 1 with 1 carried over from the 1-month counter. When
years change, this counter is reset to 0 along with the 1-month counter, and outputs a carry over of 1 to the
1-year counter. The count data is read out and written using RTCMOH/RTC_MONTH register.
1-year counter
This 4-bit BCD counter counts in units of years. It counts from 0 to 9 with 1 carried over from the month coun-
ter. This counter is reset to 0 after 9 and outputs a carry over of 1 to the 10-year counter. The count data is read
out and written using RTCYL[3:0]/RTC_YEAR register.
10-year counter
This 4-bit BCD counter counts tens of years. It counts from 0 to 9 with 1 carried over from the 1-year counter.
The count data is read out and written using RTCYH[3:0]/RTC_YEAR register.
Days of week counter
This is a septenary counter (that counts from 0 to 6) representing the days of the week. It counts with the same
timing as the 1-day counter. The count data is read out and written using RTCWK[2:0]/RTC_WEEK register.
The correspondence between the counter values and days of the week can be set in a program as desired. Table
8.2.1 lists the basic correspondence.
Table 8.2.1 Correspondence between Counter Values and Days of the Week
RTCWK[2:0]
Days of the week
0x6
Saturday
0x5
Friday
0x4
Thursday
0x3
Wednesday
0x2
Tuesday
0x1
Monday
0x0
Sunday
(Default: indeterminate)
Initial counter values
When initially reset, the counter values are not initialized. After power-on, the counter values are indeterminate.
Be sure to initialize the counters by following the procedure described in Section 8.3.2, “RTC Initial Sequence.”
About detection of leap years
The algorithm used in the RTC to detect leap years is for Anno Domini (A.D.) only, and can automatically
identify leap years up to the year 2399.
Years (0 to 99) without a remainder when divided by 4 are considered leap years. When the 1-year and 10-year
counters both are 0, a common year is assumed.