Renesas RL78 Series User Manual page 305

16-bit single-chip microcontrollers
Hide thumbs Also See for RL78 Series:
Table of Contents

Advertisement

RL78/G1D
Note Be sure to confirm that RWST = 0 before setting STOP mode.
Cautions 1. Complete the series of operations of setting the RWAIT bit to 1 to clearing the RWAIT bit to 0
within 1 second.
2. When changing the values of the SEC, MIN, HOUR, WEEK, DAY, MONTH, and YEAR register
while the counter operates (RTCE = 1), rewrite the values of the MIN register after disabling
interrupt servicing INTRTC by using the interrupt mask flag register. Furthermore, clear the
WAFG, RIFG and RTCIF flags after rewriting the MIN register.
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 written in any sequence.
All the registers do not have to be set and only some registers may be written.
R01UH0515EJ0120 Rev.1.20
Dec 16, 2016
Figure 8-22. Procedure for Writing Real-time Clock
Start
RWAIT = 1
No
RWST = 1?
Yes
Writing SEC
Writing MIN
Writing HOUR
Writing WEEK
Writing DAY
Writing MONTH
Writing YEAR
RWAIT = 0
No
Note
RWST = 0?
Yes
End
CHAPTER 8 REAL-TIME CLOCK
Stops SEC to YEAR counters.
Mode to read and write count values
Checks wait status of counter.
Writes second count register.
Writes minute count register.
Writes hour count register.
Writes week count register.
Writes day count register.
Writes month count register.
Writes year count register.
Sets counter operation.
284

Advertisement

Table of Contents
loading

This manual is also suitable for:

Rl78/g1dR5f11aggR5f11aghR5f11agj

Table of Contents