
CHAPTER 6 16-BIT TIMER/EVENT COUNTERS 00 AND 01
Preliminary User’s Manual U16228EJ1V0UD
151
CR00n can be set by a 16-bit memory manipulation instruction.
RESET input clears CR00n to 0000H.
Cautions 1. Set a value other than 0000H in CR00n in the mode in which clear & start occurs on a match
of TM0n and CR00n. However, in the free-running mode and in the clear mode using the
valid edge of TI00n, if CR00n is set to 0000H, an interrupt request (INTTM00n) is generated
following overflow (FFFFH).
2. If the changed value of CR00n is smaller than the value of 16-bit timer counter 0n (TM0n),
TM0n continues counting and starts counting again from 0 after overflow. Therefore, if the
value of CR00n after the change is smaller than before the change, the timer should be
restarted after CR00n is changed.
3. When P01 or P06 is used as the valid edge of TI01n, it cannot be used as the timer output
(TO0n). Moreover, when P01 or P06 is used as TO0n, it cannot be used as the valid edge of
TI01n.
4. When CR00n is used as a capture register, read data is undefined if the register read time
and capture trigger input conflict (the capture data itself is the correct value).
If count stop input and capture trigger input conflict, the captured data is undefined.
5. Do not rewrite the compare register during TM0n operation.
(3) 16-bit timer capture/compare register 01n (CR01n)
CR01n 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 a compare register is set by bit 2 (CRC0n2) of capture/compare control register 0n
(CRC0n).
 When CR01n is used as a compare register
The value set in the CR01n is constantly compared with the 16-bit timer counter 0n (TM0n) count value, and
an interrupt request (INTTM01n) is generated if they match.
 When CR01n is used as a capture register
It is possible to select the valid edge of the TI00n pin as the capture trigger. The TI00n valid edge is set by
prescaler mode register 0n (PRM0n).
CR01n can be set by a 16-bit memory manipulation instruction.
RESET input clears CR01n to 0000H.
Remark
n = 0:
PD780131, 780132
n = 0, 1:
PD780133, 780134, 78F0134, 780136, 780138, 78F0138
Cautions 1. Set CR01n to other than 0000H. This means a 1-pulse count operation cannot be performed
when CR01n is used as the event counter.
However, in the free-running mode and in the clear mode using the valid edge of TI00n, if
CR01n is set to 0000H, an interrupt request (INTTM01n) is generated following overflow
(FFFFH).
2. When CR01n is used as a capture register, read data is undefined if the register read time
and capture trigger input conflict (the capture data itself is the correct value).
If count stop input and capture trigger input conflict, the captured data is undefined.
3. Do not rewrite the compare register during TM0n operation.