NEC V850E/RS1 User Manual page 322

32-/16-bit single-chip microcontroller with can interface
Table of Contents

Advertisement

(2)
Reload
When data is written to the TQnCCRm register during timer operation, it is compared with the
value of the 16-bit counter via the CCRm buffer register. The value of the TQnCCRm register can
be rewritten when TQnCE = 1.
So that the set values of the TQnCCRm register is compared with the value of the 16-bit counter
(the set values are reloaded to the CCRm buffer register), the value of the TQnCCR0 register must
be rewritten and then a value must be written to the TQnCCR1 register before the value of the
16-bit counter matches the value of the CCRm buffer register.
When the value of the CCRm buffer register matches the value of the 16-bit counter, the value of
the TQnCCRm register is reloaded to the CCRm buffer register.
Whether the next reload timing is made valid or not is controlled by writing to the TQnCCR1
register.
Caution:
Remarks: 1. The above flowchart illustrates an example of PWM mode operation.
322
Downloaded from
Elcodis.com
electronic components distributor
Chapter 8 16-Bit Timer/Event Counter Q
Figure 8-16: Flowchart of Basic Operation for Reload
START
Initial setting
Enable timer operation (TQnCE = 1)
→ Transfer value of TQnCCR0
to CCR0 buffer register
Rewrite TQnCCR0.
Rewrite TQnCCR2.
Rewrite TQnCCR3.
Rewrite TQnCCR1.
• TQnCCR0 matches 16-bit counter.
• Clear and start 16-bit counter.
• Value of TQnCCRm is reloaded to
CCRm buffer register.
Writing the TQnCCR1 register includes an operation to enable reload. Therefore,
rewrite the TQnCCR1 register after rewriting other TQnCCR registers.
2. n = 0,1; m=0 to 3
User's Manual U16702EE3V2UD00
Reload is enabled
INTTQnCC0 occurs

Advertisement

Table of Contents
loading

Table of Contents