
CHAPTER 7 16-BIT TIMER/EVENT COUNTER 0
User
’
s Manual U13655EJ2V1UD
127
When CR00 is used as a compare register
The value set in CR00 is constantly compared with the 16-bit timer counter 0 (TM0) count value, and an
interrupt request (INTTM00) is generated if they match. It can also be used as the register that holds the
interval time when TM0 is set to interval timer operation.
When CR00 is used as a capture register
It is possible to use the valid edge of the TI00/TO0/P31 pin or the TI01/P30 pin as the capture trigger. The
valid edges of TI00 and TI01 are specified by setting prescaler mode register 0 (PRM0).
When CR00 is specified as a capture register and the valid edge of the TI00/TO0/P31 pin is specified as
the capture trigger, the situation is as shown in Table 7-2 and if the valid edge of the TI01/P30 pin is
specified as the capture trigger, the situation is as shown in Table 7-3.
Table 7-2. TI00/TO0/P31 Pin Valid Edge and Capture/Compare Register Capture Trigger
ES01
ES00
TI00/TO0/P31 Pin Valid Edge
CR00 Capture Trigger
CR01 Capture Trigger
0
0
Falling edge
Rising edge
Falling edge
0
1
Rising edge
Falling edge
Rising edge
1
0
Setting prohibited
Setting prohibited
Setting prohibited
1
1
Both rising and falling edges
No capture operation
Both rising and falling edges
Table 7-3. TI01/P30 Pin Valid Edge and Capture/Compare Register Capture Trigger
ES11
ES10
TI01/P30 Pin Valid Edge
CR00 Capture Trigger
0
0
Falling edge
Falling edge
0
1
Rising edge
Rising edge
1
0
Setting prohibited
Setting prohibited
1
1
Both rising and falling edges
Both rising and falling edges
CR00 is set by a 16-bit memory manipulation instruction.
RESET input makes CR00 undefined.
Cautions 1. Set CR00 to a value other than 0000H in the clear & start mode entered on match
between TM0 and CR00. However, in the free-running mode or in the clear & start mode
on a TI00 valid edge, if CR00 is set to 0000H, an interrupt request (INTTM00) is
generated after the overflow (FFFFH).
2. If the value after CR00 is changed is smaller than that of 16-bit timer counter 0 (TM0),
TM0 continues counting and overflows, then starts counting again from 0. Therefore, if
the value of CR00 after changing is smaller than the value before changing, it is
necessary to reset and restart the timer after changing the value of CR00.
3. When the valid edge of TI00 is selected as a capture trigger, the TI00/TO0/P31 pin
cannot be used as TO0. Similarly, when this pin is used as TO0, the valid edge of TI00
cannot be used as a capture trigger.