CHAPTER 6 16-BIT TIMER/EVENT COUNTER 00
Preliminary User’s Manual U16315EJ1V0UD
139
6.4 Operation of 16-Bit Timer/Event Counter 00
6.4.1 Interval timer operation
Setting 16-bit timer mode control register 00 (TMC00) and capture/compare control register 00 (CRC00) as shown
in Figure 6-7 allows operation as an interval timer. Interrupt requests are generated repeatedly using the count value
preset in 16-bit timer capture/compare register 000 (CR000) as the interval.
When the count value of 16-bit timer counter 00 (TM00) matches the value set in CR000, counting continues with
the TM00 value cleared to 0 and the interrupt request signal (INTTM000) is generated.
The count clock of the 16-bit timer/event counter 00 can be selected with bits 0 and 1 (PRM000, PRM001) of
prescaler mode register 00 (PRM00).
See
6.5 Cautions for 16-Bit Timer/Event Counter 00 (2) 16-bit timer capture/compare register setting
for
details of the operation when the compare register value is changed during timer count operation.
Figure 6-7. Control Register Settings for Interval Timer Operation
(a) 16-bit timer mode control register 00 (TMC00)
0
0
0
0
TMC003
1
TMC002
1
TMC001
0/1
OVF00
0
TMC00
Clears and starts on match between TM00 and CR000.
(b) Capture/compare control register 00 (CRC00)
0
0
0
0
0
CRC002
0/1
CRC001
0/1
CRC000
0
CRC00
CR000 used as compare register
Remark
0/1: Setting 0 or 1 allows another function to be used simultaneously with the interval timer. For details,
see
Figures 6-2
and
6-3
.