Page-11
■
Register description
1. Timing registers
(1) S
1
to Y
10
registers
These registers are 4-bit, positive logic registers in which the digits of the year, month, day, hour, minute, and second
are continuously written in BCD code.
For example, when(1, 0, 0, 1) has been written to the bits of the S
1
register, the current value in the S
1
register is 9. As
described previously, data is handled by 4-bit BCD codes. Therefore, the S
1
to Y
10
registers consist of units registers
and tens registers.
When seconds are read, for example, the values in the S
1
and S
10
registers are both read out to give the total number
of seconds.
(2) W register
The W register is a counter that increments each time the day digits are incremented. It counts from 0 to 6. Since the
value in the counter bears no relationship to the day of the week, the user can choose the coding that relates the
counter value to the day of the week. The following is just one example of this relationship;
(3) H
10
register (PM/AM, h
20
, h
10
)
The H
10
register contains a combination of the 10-hours digit bits and the PM/AM bit. Therefore, the contents of this
register will depend on whether the 12-hour clock or 24-hour clock is selected. If the 12-hour clock is selected, the user
must bear in mind that this register will contain two types of data: 10-hour data in the h
10
bit and a.m./p.m. data in the
PM/AM bit. The PM/AM bit is 0 for a.m. and 1 for p.m.
For example, if a value of 48 is obtained from the H
10
and H
1
registers when the H
10
, H
1
, M
10
, and M
1
registers are read,
remember that the inclusion of a set PM/AM bit (PM/AM=1) will make the tens digit appear to be 4. Since this bit is 1,
the time is p.m. If the value read from the M
10
and M1 registers is 00, the actual time should be read as 8:00 p.m.
Similarly, if the value read from the H
10
and H
1
registers is 11, the PM/AM bit is 0, and so this time is therefore a.m. If
the value read from the M
10
and M1 registers is 30, this time should be read as 11:30 a.m.
When the 12-hour clock is used, the h
20
bit should never be 1, but it is nonetheless physically possible to write a 1 in
this bit. The user should be careful to write a 0, to avoid unpredictable consequences. Note that, if a mistake in the
PM/AM value is made while in 12-hour-clock mode, the date digits will be half a day out. Correct setting is needed.
If the 24-hour clock is selected, the PM/AM bit will always be 0.
For details of how to set 12-hour or 24-hour clock, see the section on the 24/12 bit on page 15.
(4) Y
1
and Y
10
registers
The Y
1
and Y
10
registers can handle the last two digits of the year in the Gregorian
calendar. Leap years are automatically identified, and this affects the handling of the
month and day digits for February 29.
[Leap years]
In general, a year contains 365 days. However, the Earth takes slightly longer than
exactly 365 days to rotate around the sun, so we need to set leap years in
compensation. A leap year occurs once every four years, in years in the Gregorian
calendar that are divisible by four. However, a further small correction is necessary in
that years that are divisible by 100 are ordinary years, but years that are further
divisible by 400 are leap years.
The main leap and ordinary years since 1900 and into the future are listed on the right.
[Leap years in the RTC-72421/72423]
To identify leap years, the RTC-72421/RTC-72423 checks whether or not the year
digits are divisible by four. As implied above, 2000 will be a leap year, and so no further
correction will be necessary in that case.
This process identifies the following years as leap years:
96, (20)00, (20)04, (20)08, (20)12...
The turn-of-the-century years for which the RTC-72421/RTC-72423 will require a
correction are shown shaded in the table on the right.
If Japanese-era years are set, accurate leap-year identification will only be possible if
the era years that are divisible by four are actually leap years. As it happens, years in
the current era, Heisei, that are divisible by four are leap years, which means that
Heisei years can be set in these registers.
(5) Out-of-range data
If an impossible date or time is set, this may cause errors. If such a date is set, the behavior of the device is in general
unpredictable, so make sure that impossible data is not set.
g
n
i
t
t
e
S
s
e
m
i
t
e
l
b
i
s
s
o
P
k
c
o
l
c
r
u
o
h
-
2
1
.
m
.
p
d
n
a
.
m
.
a
,
9
5
:
1
1
o
t
0
0
:
2
1
k
c
o
l
c
r
u
o
h
-
4
2
9
5
:
3
2
o
t
0
0
:
0
0
t
n
u
o
C
0
1
2
3
4
5
6
y
a
D
y
a
d
n
u
S
y
a
d
n
o
M
y
a
d
s
e
u
T
y
a
d
s
e
n
d
e
W
y
a
d
s
r
u
h
T
y
a
d
i
r
F
y
a
d
r
u
t
a
S
d
n
a
s
r
a
e
y
p
a
e
l
l
a
u
t
c
A
s
r
a
e
y
y
r
a
n
i
d
r
o
r
a
e
Y
r
a
e
y
p
a
e
L
y
r
a
n
i
d
r
O
r
a
e
y
0
0
9
1
O
:
3
9
9
1
O
4
9
9
1
O
5
9
9
1
O
6
9
9
1
O
7
9
9
1
O
8
9
9
1
O
9
9
9
1
O
0
0
0
2
O
1
0
0
2
O
2
0
0
2
O
3
0
0
2
O
4
0
0
2
O
5
0
0
2
O
:
0
0
1
2
O
0
0
2
2
O
0
0
3
2
O
0
0
4
2
O
: