152
CHAPTER 8 16-BIT TIMER/EVENT COUNTER
User’s Manual U12697EJ3V0UM
(2) Capture/compare register 00 (CR00)
CR00 is a 16-bit register that functions as a capture register and as a compare register. Whether this register
functions as a capture or compare register is specified by using bit 0 (CRC00) of capture/compare control register
0.
•
When using CR00 as compare register
The value set to CR00 is always compared with the count value of 16-bit timer counter 0 (TM0). When the
values of the two coincide, an interrupt request (INTTM00) is generated. When TM00 is used as an interval
timer, CR00 can also be used as a register that holds the interval time.
•
When using CR00 as capture register
The valid edge of the TI00 or TI01 pin can be selected as a capture trigger. The valid edges for TI00 and
TI01 are set with prescaler mode register 0 (PRM0).
Tables 8-2 and 8-3 show the conditions that apply when the capture trigger is specified as the valid edge of
the TI00 pin and the valid edge of the TI01 pin respectively.
Table 8-2. Valid Edge of TI00 Pin and Capture Trigger of CR00
ES01
ES00
Valid Edge of TI00 Pin
Capture Trigger of CR00
0
0
Falling edge
Rising edge
0
1
Rising edge
Falling edge
1
0
Setting prohibited
Setting prohibited
1
1
Both rising and falling edges
No capture operation
Table 8-3. Valid Edge of TI01 Pin and Capture Trigger of CR00
ES01
ES00
Valid Edge of TI01 Pin
Capture Trigger of CR00
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 sets CR00 to 0000H.
Caution Set any value other than 0000H in CR00. When using the register as an event counter, a count
for one-pulse can not be operated.