English
Language : 

HD6413007F20 Datasheet, PDF (354/798 Pages) Renesas Technology Corp – Hardware Manual Renesas 16-Bit Single-Chip Microcomputer H8 Family/H8/300H Series
9. 16-Bit Timer
• Sample setup procedure for input capture
Figure 9.21 shows a sample procedure for setting up input capture.
Input selection
1. Set TIOR to select the input capture function of a
general register and the rising edge, falling edge,
or both edges of the input capture signal. Clear the
DDR bit to 0 before making these TIOR settings.
Select input-capture input 1
Start counter
2 2. Set the STR bit to 1 in TSTR to start the timer
counter.
Input capture
Figure 9.21 Setup Procedure for Input Capture (Example)
• Examples of input capture
Figure 9.22 illustrates input capture when the falling edge of TIOCB and both edges of TIOCA
are selected as capture edges. 16TCNT is cleared by input capture into GRB.
16TCNT value
H'0180
H'0160
H'0005
H'0000
TIOCB
TIOCA
GRA
H'0005
H'0160
GRB
Figure 9.22 Input Capture (Example)
H'0180
Rev.5.00 Sep. 12, 2007 Page 324 of 764
REJ09B0396-0500