153
CHAPTER 8 16-BIT TIMER/EVENT COUNTER
User’s Manual U12697EJ3V0UM
(3) Capture/compare register 01 (CR01)
This is a 16-bit register that can be used as a capture register and a compare register. Whether it is used as
a capture register or compare register is specified by bit 2 (CRC02) of capture/compare control register 0.
•
When using CR01 as compare register
The value set to CR01 is always compared with the count value of 16-bit timer counter 0 (TM0). When the
values of the two coincide, an interrupt request (INTTM01) is generated.
•
When using CR01 as capture register
The valid edge of the TI00 pin can be selected as a capture trigger. The valid edge for TI00 is set with prescaler
mode register 0 (PRM0).
Table 8-4 shows the conditions that apply when the capture trigger is specified as the valid edge of the TI00
pin.
Table 8-4. Valid Edge of TI00 Pin and Capture Trigger of CR01
ES01
ES00
Valid Edge of TI00 Pin
Capture Trigger of CR01
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
CR01 is set by a 16-bit memory manipulation instruction.
RESET input sets CR01 to 0000H.
Caution Set any value other than 0000H in CR01. When using the register as an event counter, a count
for one-pulse can not be operated.