Hitachi H8/3032 Series Hardware Manual page 233

Table of Contents

Advertisement

Downloaded from
Elcodis.com
electronic components distributor
Input selection
Select input-capture input
Start counter
Input capture
Figure 8-23 Setup Procedure for Input Capture (Example)
Examples of input capture
Figure 8-24 illustrates input capture when the falling edge of TIOCB and both edges of
TIOCA are selected as capture edges. TCNT is cleared by input capture into GRB.
TCNT value
H'0180
H'0160
H'0005
H'0000
TIOCB
TIOCA
GRA
H'0005
GRB
Figure 8-24 Input Capture (Example)
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
port data direction bit to 0 before making these
TIOR settings.
1
2
2.
Set the STR bit to 1 in TSTR to start the timer
counter.
H'0160
218
Counter cleared by TIOCB
input (falling edge)
Time
H'0180

Advertisement

Table of Contents
loading

Table of Contents