8 Real-TiMe ClOCK (RTC)
8-2
Seiko epson Corporation
S1C17153 TeChniCal Manual
(Rev. 1.0)
Minute counter
This 7-bit binary counter counts from 0 to 59 minutes with 1 carried over from the second counter. This counter
is also used as a 3-bit (0 to 5) + 4-bit (0 to 9) BCD counter by setting BCDMD/RTC_CTL register to 1. The
counter data can be read/written using RTCMIN[6:0]/RTC_MS register. The counter is reset to 0 when it reach-
es 60 minutes and outputs a carry over of 1 to the hour counter.
RTCMIN[6:0]
Binary mode
0–59
RTCMIN[3:0]
BCD mode
0–9 (1-minute digit)
RTCMIN[6:4]
0–5 (10-minute digit)
2.2 Minute Counter
Figure 8.
hour counter
This 6-bit binary counter counts from 0 to 23 o’clock (24-hour mode) or from 1 to 12 o’clock (12-hour mode)
with 1 carried over from the minute counter. This counter is also used as a 2-bit (0 to 2 or 0 to 1) + 4-bit (0
to 9) BCD counter by setting BCDMD/RTC_CTL register to 1. The counter data can be read/written using
RTCHOUR[5:0]/RTC_H register.
AMPM
0 (AM)/1 (PM)
0/1
AMPM
0/1
RTCHOUR[5:0]
24-hour mode
Binary mode
0–23
RTCHOUR[3:0]
BCD mode
0–9 (1-hour digit)
RTCHOUR[5:4]
0–2 (10-hour digit)
RTCHOUR[5:0]
12-hour mode
1–12
RTCHOUR[3:0]
0–9 (1-hour digit)
RTCHOUR[5:4]
0–1 (10-hour digit)
2.3 Hour Counter
Figure 8.
2.1 Hour Counter Values
Table 8.
Time
24-hour mode
12-hour mode
RTCHOUR[5:0]
(binary)
RTCHOUR[5:0]
(BCD)
RTCHOUR[5:0]
(binary)
RTCHOUR[5:0]
(BCD)
AMPM
0 o'clock (12am)
0x0
0x00
0xc
0x12
0
1 o'clock (1am)
0x1
0x01
0x1
0x01
0
2 o'clock (2am)
0x2
0x02
0x2
0x02
0
3 o'clock (3am)
0x3
0x03
0x3
0x03
0
4 o'clock (4am)
0x4
0x04
0x4
0x04
0
5 o'clock (5am)
0x5
0x05
0x5
0x05
0
6 o'clock (6am)
0x6
0x06
0x6
0x06
0
7 o'clock (7am)
0x7
0x07
0x7
0x07
0
8 o'clock (8am)
0x8
0x08
0x8
0x08
0
9 o'clock (9am)
0x9
0x09
0x9
0x09
0
10 o'clock (10am)
0xa
0x10
0xa
0x10
0
11 o'clock (11am)
0xb
0x11
0xb
0x11
0
12 o'clock (12pm)
0xc
0x12
0xc
0x12
1
13 o'clock (1pm)
0xd
0x13
0x1
0x01
1
14 o'clock (2pm)
0xe
0x14
0x2
0x02
1
15 o'clock (3pm)
0xf
0x15
0x3
0x03
1
16 o'clock (4pm)
0x10
0x16
0x4
0x04
1
17 o'clock (5pm)
0x11
0x17
0x5
0x05
1
18 o'clock (6pm)
0x12
0x18
0x6
0x06
1
19 o'clock (7pm)
0x13
0x19
0x7
0x07
1
20 o'clock (8pm)
0x14
0x20
0x8
0x08
1
21 o'clock (9pm)
0x15
0x21
0x9
0x09
1
22 o'clock (10pm)
0x16
0x22
0xa
0x10
1
23 o'clock (11pm)
0x17
0x23
0xb
0x11
1
initial counter values
An initial reset does not initialize the counter values. Be sure to initialize the counters via software.