RL78/G1A CHAPTER 7 REAL-TIME CLOCK
7.4.3 Reading/writing real-time clock
Read or write the counter after setting 1 to RWAIT first.
Set RWAIT to 0 after completion of reading or writing the counter.
Figure 7-21. Procedure for Reading Real-time Clock
Reading MIN
RWAIT = 1
Reading SEC
Start
RWST = 1?
Stops SEC to YEAR counters.
Mode to read and write count values
Reads second count register.
Reads minute count register.
No
Yes
Reading HOUR
Reads hour count register.
Reading WEEK
Reads week count register.
Reading DAY
Reads day count register.
Reading MONTH
Reads month count register.
Reading YEAR
Reads year count register.
RWAIT = 0
RWST = 0?
Note
No
Yes
Sets counter operation.
Checks wait status of counter.
End
Note Be sure to confirm that RWST = 0 before setting STOP mode.
Caution Complete the series of process of setting the RWAIT bit to 1 to clearing the RWAIT bit to 0 within 1
second.
Remark The second count register (SEC), minute count register (MIN), hour count register (HOUR), week count
register (WEEK), day count register (DAY), month count register (MONTH), and year count register (YEAR)
may be read in any sequence.
All the registers do not have to read and only some registers may be read.
R01UH0305EJ0200 Rev.2.00 312
Jul 04, 2013