
130
CHAPTER 6
16-BIT TIMER/EVENT COUNTER 0
User’s Manual U12790EJ2V0UD
6.4 Operation of 16-Bit Timer/Event Counter 0
6.4.1 Operation as interval timer
16-bit timer/event counter 0 operates as an interval timer when 16-bit timer mode control register 0 (TMC0) and
capture/compare control register 0 (CRC0) are set as shown in Figure 6-7. An interrupt request is repeatedly
generated at intervals specified by the count value preset to 16-bit capture/compare register 00 (CR00).
When the count value of 16-bit timer counter 0 (TM0) matches the set value of CR00, the value of TM0 is cleared
to 0 and an interrupt request signal (INTTM00) is generated.
The count clock of 16-bit timer/event counter 0 is selected by bits 0 and 1 (PRM00 and PRM01) of prescaler mode
register 0 (PRM0).
For details of the operation when the value of the compare register is changed during timer count operation, refer
to (3) in 6.6 Notes on 16-Bit Timer/Event Counter 0.
Figure 6-7. Setting of Control Registers for Interval Timer Operation
(a) 16-bit timer mode control register 0 (TMC0)
(b) Capture/compare control register 0 (CRC0)
Remark
0/1: When these bits are set to 1 or reset to 0, other functions can be used at the same time as the
interval timer function. For details, refer to Figures 6-2 and 6-3.
0000
TMC03
1
TMC02
1
TMC01
0/1
OVF0
0
TMC0
Clear & start on match between TM0 and CR00
00000
CRC02
0/1
CRC01
0/1
CRC00
0
CRC0
CR00 is used as compare register.