• Example of Setting Procedure for Input Capture Operation
Figure 12.12 shows an example of the setting procedure for input capture operation.
Select input capture input
<Input capture operation>
Figure 12.12 Example of Setting Procedure for Input Capture Operation
• Example of Input Capture Operation
Figure 12.13 shows an example of input capture operation.
In this example both rising and falling edges have been selected as the TIOCA pin input
capture input edge, falling edge has been selected as the TIOCB pin input capture input edge,
and counter clearing by TGRB input capture has been designated for TCNT.
TCNT value
H'0180
H'0160
H'0010
H'0005
H'0000
TIOCA
TGRA
TIOCB
TGRB
Input selection
Start counting
H'0005
Figure 12.13 Example of Input Capture Operation
[1]
Designate TGR as an input capture register by
means of TIOR, and select rising edge, falling
edge, or both edges as the input capture source
and input signal edge.
[2]
Set the CST bit in TSTR to 1 to start the count
operation.
[1]
[2]
Counter cleared by TIOCB
input (falling edge)
H'0160
H'0180
Rev. 1.00, 09/03, page 331 of 704
Time
H'0010