Operation Of 16-Bit Timer/Event Counters 00 And 01; Interval Timer Operation - NEC MuPD78F0132H User Manual

8-bit single-chip microcontrollers, 78k0/ke1plus
Table of Contents

Advertisement

6.4 Operation of 16-Bit Timer/Event Counters 00 and 01

6.4.1 Interval timer operation

Setting 16-bit timer mode control register 0n (TMC0n) and capture/compare control register 0n (CRC0n) as shown
in Figure 6-15 allows operation as an interval timer.
Setting
The basic operation setting procedure is as follows.
<1> Set the CRC0n register (see Figure 6-15 for the set value).
<2> Set any value to the CR00n register.
<3> Set the count clock by using the PRM0n register.
<4> Set the TMC0n register to start the operation (see Figure 6-15 for the set value).
Caution Do not rewrite CR00n during TM0n operation.
Remark For how to enable the INTTM00n interrupt, see CHAPTER 17 INTERRUPT FUNCTIONS.
Interrupt requests are generated repeatedly using the count value preset in 16-bit timer capture/compare register
00n (CR00n) as the interval.
When the count value of 16-bit timer counter 0n (TM0n) matches the value set in CR00n, counting continues with
the TM0n value cleared to 0 and the interrupt request signal (INTTM00n) is generated.
The count clock of 16-bit timer/event counter 0n can be selected with bits 0 and 1 (PRM0n0, PRM0n1) of prescaler
mode register 0n (PRM0n).
µ
Remark n = 0:
PD78F0132H
µ
n = 0, 1:
PD78F0133H, 78F0134H, 78F0136H, 78F0138H, 78F0138HD
CHAPTER 6 16-BIT TIMER/EVENT COUNTERS 00 AND 01
User's Manual U16899EJ2V0UD
153

Advertisement

Table of Contents
loading

Table of Contents