Application Examples - NEC V850E/IA1 mPD703116 User Manual

32-bit single-chip microcontrollers
Hide thumbs Also See for V850E/IA1 mPD703116:
Table of Contents

Advertisement

CHAPTER 9 TIMER/COUNTER FUNCTION (REAL-TIME PULSE UNIT)

9.4.6 Application examples

(1) Interval timer
By setting the TMC30 and TMC31 registers as shown in Figure 9-90, timer 3 operates as an interval timer
that repeatedly generates interrupt requests with the value that was set in advance in the CC30 register as
the interval.
When the counter value of the TM3 register matches the setting value of the CC30 register, the TM3 register
is cleared (0000H) and an interrupt request signal (INTCC30) is generated at the same time that the count
operation resumes.
Figure 9-90. Contents of Register Settings When Timer 3 Is Used as Interval Timer
TM3OVF
CS2
0/1
0/1
TMC30
OST ENT1 ALV
0
0/1
TMC31
Remark
0/1: Set to 0 or 1 as necessary
396
CS1
CS0
TM3CETM3CAE
0/1
0/1
0
0
ETI
CCLR
CMS1 CMS0
ECLR
0/1
0/1
1
0/1
User's Manual U14492EJ3V0UD
1
1
Supply input clocks to internal units
Enable count operation
0/1
1
Use CC30 register as compare register
Clear TM3 register due to match with
CC30 register
Continue counting after TM3 register
overflows

Advertisement

Table of Contents
loading

Table of Contents