CHAPTER 6 16-BIT TIMER/EVENT COUNTER 00
Preliminary User’s Manual U16315EJ1V0UD
131
(1) 16-bit timer counter 00 (TM00)
TM00 is a 16-bit read-only register that counts count pulses.
The counter is incremented in synchronization with the rising edge of the input clock. The count value is reset to
0000H in the following cases.
<1>
At RESET input
<2>
If TMC003 and TMC002 are cleared
<3>
If the valid edge of TI000 is input in the mode in which clear & start occurs when inputting the valid edge of
TI000
<4>
If TM00 and CR000 match in the mode in which clear & start occurs on a match of TM00 and CR000
<5>
OSPT00 is set in one-shot pulse output mode
(2) 16-bit timer capture/compare register 000 (CR000)
CR000 is a 16-bit register that has the functions of both a capture register and a compare register. Whether it is
used as a capture register or as a compare register is set by bit 0 (CRC000) of capture/compare control register
00 (CRC00).
••••
When CR000 is used as a compare register
The value set in CR000 is constantly compared with the 16-bit timer counter 00 (TM00) count value, and an
interrupt request (INTTM000) is generated if they match. It can also be used as the register that holds the
interval time when TM00 is set to interval timer operation.
••••
When CR000 is used as a capture register
It is possible to select the valid edge of the TI000 pin or the TI010 pin as the capture trigger. The TI000 or
TI010 valid edge is set using prescaler mode register 00 (PRM00).
If the capture trigger is specified to be the valid edge of the TI000 pin, the situation is as shown in Table 6-2.
On the other hand, when the capture trigger is specified to be the valid edge of the TI010 pin, the situation is
as shown in Table 6-3.
Table 6-2. TI000 Pin Valid Edge and CR000, CR010 Capture Trigger
ES001
ES000
TI000 Pin Valid Edge
CR000 Capture Trigger
CR010 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 6-3. TI010 Pin Valid Edge and CR000 Capture Trigger
ES101
ES100
TI010 Pin Valid Edge
CR000 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