Reading/Writing Real-Time Counter - NEC 78K0R/KE3 User Manual

16-bit single-chip microcontrollers
Table of Contents

Advertisement

7.4.3 Reading/writing real-time counter

Read or write the counter after setting 1 to RWAIT first.
Note Be sure to confirm that RWST = 0 before setting STOP mode.
Caution Complete the series of operations of setting RWAIT to 1 to clearing RWAIT to 0 within 1 second.
Remark SEC, MIN, HOUR, WEEK, DAY, MONTH, and YEAR may be read in any sequence.
All the registers do not have to be set and only some registers may be read.
280
CHAPTER 7 REAL-TIME COUNTER
Figure 7-21. Procedure for Reading Real-Time Counter
Start
RWAIT = 1
No
RWST = 1?
Yes
Reading SEC
Reading MIN
Reading HOUR
Reading WEEK
Reading DAY
Reading MONTH
Reading YEAR
RWAIT = 0
No
Note
RWST = 0?
Yes
End
User's Manual U17854EJ9V0UD
Stops SEC to YEAR counters.
Mode to read and write count values
Checks wait status of counter.
Reads second count register.
Reads minute count register.
Reads hour count register.
Reads week count register.
Reads day count register.
Reads month count register.
Reads year count register.
Sets counter operation.

Advertisement

Table of Contents
loading

Table of Contents