
CHAPTER 6 16-BIT TIMER/EVENT COUNTERS 00 AND 01
Preliminary User’s Manual U16228EJ1V0UD
150
(1) 16-bit timer counter 0n (TM0n)
TM0n 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 TMC0n3 and TMC0n2 are cleared
<3>
If the valid edge of TI00n is input in the mode in which clear & start occurs when inputting the valid edge of
TI00n
<4>
If TM0n and CR00n match in the mode in which clear & start occurs on a match of TM0n and CR00n
<5>
OSPT0n is set in one-shot pulse output mode
(2) 16-bit timer capture/compare register 00n (CR00n)
CR00n 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 (CRC0n0) of capture/compare control register
0n (CRC0n).
When CR00n is used as a compare register
The value set in CR00n is constantly compared with the 16-bit timer counter 0n (TM0n) count value, and an
interrupt request (INTTM00n) is generated if they match. It can also be used as the register that holds the
interval time when TM0n is set to interval timer operation.
When CR00n is used as a capture register
It is possible to select the valid edge of the TI00n pin or the TI01n pin as the capture trigger. The TI00n or
TI01n valid edge is set using prescaler mode register 0n (PRM0n).
If the capture trigger is specified to be the valid edge of the TI00n 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 TI01n pin, the situation is
as shown in Table 6-3.
Table 6-2. TI00n Pin Valid Edge and CR00n, CR01n Capture Trigger
ES0n1
ES0n0
TI00n Pin Valid Edge
CR00n Capture Trigger
CR01n Capture Trigger
0
Falling edge
Rising edge
Falling edge
0
1
Rising edge
Falling edge
Rising edge
1
0
Setting prohibited
1
Both rising and falling edges
No capture operation
Both rising and falling edges
Table 6-3. TI01n Pin Valid Edge and CR00n Capture Trigger
ES1n1
ES1n0
TI01n Pin Valid Edge
CR00n Capture Trigger
0
Falling edge
0
1
Rising edge
1
0
Setting prohibited
1
Both rising and falling edges
Remark
n = 0:
PD780131, 780132
n = 0, 1:
PD780133, 780134, 78F0134, 780136, 780138, 78F0138