
319
Chapter 8
16-Bit Timer/Event Counter Q
User’s Manual U16702EE3V2UD00
8.5 Operation
Timer Q can perform the following operations.
Notes: 1.
When using the external event count function, set TIQn0 capture input edge detection to
“Detect no edge”. (Set TQnIS1 and TQnIS0 bits of TQnIOC1 register to “00”.)
2.
When using the external trigger pulse output mode, one-shot pulse mode, or pulse width
measurement mode, select the internal clock as the count clock (by setting the TQnEEE bit
of the TQnCTL1 register to 1).
Caution:
Clearing the TQnCCR1 register to 0000H is prohibited in the one-shot pulse mode.
8.5.1 Anytime write and reload
Timer Q allows rewriting of the TQnCCR0 to TQnCCR3 registers while the timer is operating
(TQnCE = 1). These registers are written differently (anytime write or reload) depending on the mode.
(1)
Anytime write
When data is written to the TQnCCR0 to TQnCCR3 registers during timer operation, it is
transferred at any time to the CCR0 buffer register and is compared with the value of the 16-bit
counter.
Operation
TQnEST
Software
trigger input
TIQn0
External
trigger input
TQnEEE
Count clock
selection
Capture/
Compare Write
Compare
Write
Interval timer mode
Invalid
Invalid
Internal/TIQn0 pin
Compare only
Any time write
External event counter
mode
Note 1
Invalid
Invalid
TIQn0 pin only
Compare only
Any time write
External trigger pulse
output
mode
Note 2
Valid
Valid
Internal only
Compare only
Reload
One-shot pulse output
mode
Note 2
Valid
Valid
Internal only
Compare only
Any time write
PWM mode
Invalid
Invalid
Internal/TIQn0 pin
Compare only
Reload
Free-running mode
Invalid
Invalid
Internal/TIQn0 pin
Capture/com-
pare switching
enabled
Any time write
Pulse width measure-
ment
mode
Note 2
Invalid
Invalid
Internal only
Capture only
Not applicable
electronic components distributor