BAT32G1x9 user manual | Chapter 11 Real-time clock
457 / 1149
Rev.1.02
11.4.3
Read and write to the real-time clock counter
The RWAIT must first be set to "1" and then the counter must be read and written. The RWAIT position
must be "0" after reading and writing the counter.
Figure 11-21 The read operation procedure of the real-time clock counter
start
RWAIT=1
设定
SEC
read SEC
read MIN
read HOUR
read WEEK
read DAY
read MONTH
read YEAR
RWAIT=0
RWST=0
?
Note
Yes
No
end
configure as SEC~Year counter
stop operating, enter into read/
write mode of counter.
confirm counter wait state
Read second count register
Read minute count register
Read hour count register
Read week count register
read day count register
read month count register
read year count register
configure counter operation
RWST=1?
No
Yes
Note That the RWST
bit must
be
confirmed
to be
"0"
before moving to
sleep
mode
.
Note that processing from RWAIT
position
"1"
to
RWAIT
position
"0"
must
be carried out within
1
second
.
Note There is no limit to the order of read operations for seconds/minutes/hours/
week
/day/month/and year count registers/.
It is possible to read only part of the registers without reading all the registers.