
iiiPeriPheraLModuLes1(systeM):reaL-tiMeCLoCk(rtC)
iii-3-2
ePson
s1C33L17teChniCaLManuaL
iii.3.2rtCCounters
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-secondcounter
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] (D[3:0]/0x301910).
rtCsL[3:0]:RTC1-secondCounterBitsintheRTCSecondRegister(D[3:0]/0x301910)
10-secondcounter
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] (D[6:4]/0x301910).
rtCsh[2:0]:RTC10-secondCounterBitsintheRTCSecondRegister(D[6:4]/0x301910)
1-minutecounter
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] (D[3:0]/0x301914).
rtCMiL[3:0]:RTC1-minuteCounterBitsintheRTCMinuteRegister(D[3:0]/0x301914)
10-minutecounter
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] (D[6:4]/0x301914).
rtCMih[2:0]:RTC10-minuteCounterBitsintheRTCMinuteRegister(D[6:4]/0x301914)
1-hourcounter
This 4-bit BCD counter counts in units of hours. It counts from 0 to 9 with 1 carried over from the 10-minute
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] (D[3:0]/0x301918).
rtChL[3:0]:RTC1-hourCounterBitsintheRTCHourRegister(D[3:0]/0x301918)
10-hourcounter
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 counter 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] (D[5:4]/0x301918).
rtChh[1:0]:RTC10-hourCounterBitsintheRTCHourRegister(D[5:4]/0x301918)
When 12-hour mode is selected, RTCAP (D6/0x301918) 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 (D6/0x301918) is fixed to 0.
rtCaP:AM/PMIndicatorBitintheRTCHourRegister(D6/0x301918)