
RP/RF/RS5C62
31
11.2 Writing to or Reading from Time and Calendar Counters
11.2-1 Writing to or Reading from Time and Calendar Counters by Stopping Time Count Operation
(by Setting WTEN and checking BSY bits)
Set 12- or 24-hour
time scale
Wait
YES
NO
BSY=0
WTEN
BANK
0
0
*
1
*
2
*
3
*
5
*
4
Write to or read from time
and calendar counters
WTEN
1
*
6
*
1) Set the 12- or 24-hour time scale once before writing to the time and cal-
endar counters (at the time of initialization after power-on from 0V).
*
2) Set the WTEN bit to “0” in the control register 1 to stop the second and
higher-order digits.
*
3) When the BSY bit is set to “1” in the control register 2, continue reading
from the time and calendar counters until it is set to “0” or wait for 122.1
μs or more. When the BSY bit is set to “0”, it is kept at “0” until the
WTEN bit is set to “1” again in the control register 1.
*
4) Writing to the 1-year or 10-year counter automatically enables leap year
indication. To disable leap year indication, write “4h” (set the LYE bit to
“1” ) in the leap year indication register after setting the time and calen-
dar counters. Note that leap year indication is continued without correc-
tion until the year 2099.
*
5) When reading from the time and calendar counters, ensure that this route
lasts within 1 second. If this route lasts within 1 second, the 1-second
digit is incremented by 1 to correct a 1-second carry occurring during
read operation upon setting the WTEN bit to “1” again in the control reg-
ister 1. Note that the 1-second digit is also incremented by 1 to correct
more than one 1-second carry while the WTEN bit is kept at “0”, resulting
in a clock delay.
*
6) Restart time count operation. (The WTEN bit will automatically be set to
“1” in the control register 1 upon driving low the CE pin.)
*
7) When writing to the time and calendar counters, be sure to check the
BSY bit in the control register 2 by disabling a carry (by setting the
WTEN bit to “0” ).
Writing to the time and calendar counters must be performed in the absence of a carry. In particular, correct
writing to the time and calendar counters requires stopping time count operation (by setting that the WTEN bit to
“0” in the control register 1) and confirming the absence of a carry (by checking that the BSY bit to “0” in the con-
trol register 2). On the other hand, reading from the time and calendar counters may be performed by stopping
time count operation, generating a cyclic interrupt, or dual reading.