BAT32G1x9 user manual | Chapter 11 Real-time clock
458 / 1149
Rev.1.02
Figure 11-22: Read procedure for a real-time clock counter
Start
RWAIT=1
设定
SEC
Write SEC
Write MIN
Write HOUR
Write WEEK
Write DAY
Write MONTH
Write 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
Write second count register
Write minute count register
Write hour count register
Write week count register
Write day count register
Write month count register
Write year count register
configure counter operation
RWST=1?
No
Yes
Note You must confirm that the
RWST
bit is
"0"
before moving to
SLEEP
mode
.
Note 1.
Processing from RWAIT position "1" to RWAIT position "0" must be carried out within 1 second.
2. To rewrite SEC, MIN, HOUR, WEEK, DAY, MONTH in counter operation (RTCE=1). When the YEAR register is registered,
it must be overwritten after the INRTC is set to disable interrupt processing through the interrupt mask flag register, and the
WAFG flag and RIFG must be cleared after the rewrite Flag and RTCIF flag.
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.