NEC 78K0R/KE3 User Manual page 267

16-bit single-chip microcontrollers
Table of Contents

Advertisement

Figure 7-4. Format of Real-Time Counter Control Register 1 (RTCC1) (2/2)
RIFG
0
Constant-period interrupt is not generated.
1
Constant-period interrupt is generated.
This flag indicates the status of generation of the constant-period interrupt. When the constant-period interrupt is
generated, it is set to "1".
This flag is cleared when "0" is written to it. Writing "1" to it is invalid.
RWST
0
Counter is operating.
1
Mode to read or write counter value
This status flag indicates whether the setting of RWAIT is valid.
Before reading or writing the counter value, confirm that the value of this flag is 1.
RWAIT
0
Sets counter operation.
1
Stops SEC to YEAR counters. Mode to read or write counter value
This bit controls the operation of the counter.
Be sure to write "1" to it to read or write the counter value.
Because RSUBC continues operation, complete reading or writing of it in 1 second, and clear this bit back to 0.
When RWAIT = 1, it takes up to 1 clock (32.768 kHz) until the counter value can be read or written.
If RSUBC overflows when RWAIT = 1, it counts up after RWAIT = 0. If the second count register is written,
however, it does not count up because RSUBC is cleared.
Caution The RIFG and WAFG flags may be cleared when the RTCC1 register is written by using a 1-bit
manipulation instruction. Use, therefore, an 8-bit manipulation instruction in order to write to
the RTCC1 register. To prevent the RIFG and WAFG flags from being cleared during writing,
disable writing by setting "1" to the corresponding bit. When the value may be rewritten
because the RIFG and WAFG flags are not being used, the RTCC1 register may be written by
using a 1-bit manipulation instruction.
Remark Fixed-cycle interrupts and alarm match interrupts use the same interrupt source (INTRTC). When
using these two types of interrupts at the same time, which interrupt occurred can be judged by
checking the fixed-cycle interrupt status flag (RIFG) and the alarm detection status flag (WAFG)
upon INTRTC occurrence.
CHAPTER 7 REAL-TIME COUNTER
Constant-period interrupt status flag
Wait status flag of real-time counter
Wait control of real-time counter
User's Manual U17854EJ9V0UD
267

Advertisement

Table of Contents
loading

Table of Contents