English
Language : 

SH7040 Datasheet, PDF (367/923 Pages) Renesas Technology Corp – Renesas 32-Bit Single-Chip RISC Microprocessor SuperH RISC engine Family/SH7040 Series(CPU Core SH-2)
TCNT value
H'FFFF
TGRB
TGRA
H'0000
TIOCA
Counter cleared by TGRB compare match
Time
Toggle
output
TIOCB
Toggle
output
Figure 12.12 Example of Toggle Output
Input Capture Function: In the input capture mode, the TCNT value is transferred into the TGR
register when the input edge is detected at the input capture/output compare pin (TIOC).
Detection can take place on the rising edge, falling edge, or both edges. Channels 0 and 1 can use
other channel counter input clocks or compare-match signals as input capture sources.
The procedure for selecting the input capture operation (figure 12.13) is:
1. Set the TIOR to select the input capture function of the TGR, then select the input capture
source, and rising edge, falling edge, or both edges as the input edge.
2. Set the CST bit in the TSTR to 1 to start the TCNT counting.
Input selection
Select input-capture input 1
Start counting
2
Input capture operation
Figure 12.13 Procedure for Selecting Input Capture Operation
329