CHAPTER 9 TIMER/COUNTER FUNCTION
388
User’s Manual U15195EJ5V0UD
9.4.7 Application examples
(1) Interval timer
By setting the TMC30 and TMC31 registers as shown in Figure 9-96, 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-96. Contents of Register Settings When Timer 3 Is Used as Interval Timer
Supply input clocks to internal units
Enable count operation
0
0/1
0/1
0/1
1
0/1
0/1
1
OST
ENT
ALV
ETI
CCLR
CMS1 CMS0
0/1
0/1
0/1
0/1
0
0
1
1
TM3OVF
TMC30
TMC31
CS2
CS1
CS0
TM3CE TM3CAE
Use CC30 register as compare register
Clear TM3 register due to match with
CC30 register
Continue counting after TM3 register
overflows
ECLR
Remark
0/1: Set to 0 or 1 as necessary
Содержание PD703114
Страница 2: ...2 User s Manual U15195EJ5V0UD MEMO ...