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

8-bit single-chip microcontrollers
Hide thumbs Also See for 78K0:
Table of Contents

Advertisement

7.4

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

7.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 7-15 allows operation as an interval timer.
Setting
The basic operation setting procedure is as follows.
<1> Set the CRC0n register (see Figure 7-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 7-15 for the set value).
Caution CR00n cannot be rewritten during TM0n operation.
Remark For how to enable the INTTM00n interrupt, see CHAPTER 19 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:
PD780143, 780144
µ
n = 0, 1:
PD780146, 780148, 78F0148
CHAPTER 7 16-BIT TIMER/EVENT COUNTERS 00 AND 01
*
User's Manual U15947EJ2V0UD
185

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

78kf1

Table of Contents