(2)
Capture/compare register 1 (TQnCCR1)
The TQnCCR1 register is a 16-bit register that has a capture function and a compare function.
Whether this register is used as a capture register or a compare register can be specified by using
the TQnCCS1 bit of the TQnOPT0 register, but only in the free-running mode.
In the pulse width measurement mode, this register can be used only as a capture register (it
cannot be used as a compare register).
In all the modes other than the free-running mode and pulse width measurement mode, this
register functions as a compare register.
In the default status, the TQnCCR1 register functions as a reload register.
This register can be read or written in 16-bit units.
RESET input clears this register to 0000H.
Caution:
TQ0CCR1
TQ1CCR1
• When used as a compare register
TQnCCR1 can be rewritten when TQnCE = 1, as below mentioned:
PWM output mode, external trigger pulse output mode,
or triangular wave PWM mode
Free-running mode, external event count mode,
one-shot pulse mode or interval timer mode
Pulse width measurement mode
• When used as a capture register
The count value is stored in TQnCCR1 upon capture trigger (TIQn1) input edge detection.
Downloaded from
Elcodis.com
electronic components distributor
Chapter 8 16-Bit Timer/Event Counter Q
In the one-shot pulse mode, it is prohibited to set the TQnCCR1 register to 0000H.
Figure 8-3: Capture/Compare Register 1 (TQnCCR1) Format
15
14
13
12
11
10
9
15
14
13
12
11
10
9
TMQ Operation Mode
User's Manual U16702EE3V2UD00
8
7
6
5
4
3
2
8
7
6
5
4
3
2
Method of Writing TQnCCR1 Register
Reload
Any time write
Cannot be used because used only as capture register
Initial
1
0
Address
R/W
value
FFFF F548H R/W 0000H
Initial
1
0
Address
R/W
value
FFFF F618H R/W 0000H
307