Input Capture Setting - Hitachi H8/3008 Hardware Manual

16-bit microcomputer
Table of Contents

Advertisement

9.4.6

Input Capture Setting

The 8TCNT value can be transferred to TCORB on detection of an input edge on the input
capture/output compare pin (TMIO
can be selected. In 16-bit count mode, 16-bit input capture can be used.
Setting Input Capture Operation in 8-Bit Timer Mode (Normal Operation)
• Channel 1:
 Set TCORB1 as an 8-bit input capture register with the ICE bit in 8TCSR1.
 Select rising edge, falling edge, or both edges as the input edge(s) for the input capture
signal (TMIO
 Select the input clock with bits CKS2 to CKS0 in 8TCR1, and start the 8TCNT count.
• Channel 3:
 Set TCORB3 as an 8-bit input capture register with the ICE bit in 8TCSR3.
 Select rising edge, falling edge, or both edges as the input edge(s) for the input capture
signal (TMIO
 Select the input clock with bits CKS2 to CKS0 in 8TCR3, and start the 8TCNT count.
Note: When TCORB1 in channel 1 is used for input capture, TCORB0 in channel 0 cannot be
used as a compare match register.
Similarly, when TCORB3 in channel 3 is used for input capture, TCORB2 in channel 2
cannot be used as a compare match register.
Setting Input Capture Operation in 16-Bit Count Mode
• Channels 0 and 1:
 In 16-bit count mode, TCORB0 and TCORB1 function as a 16-bit input capture register
when the ICE bit is set to 1 in 8TCSR1.
 Select rising edge, falling edge, or both edges as the input edge(s) for the input capture
signal (TMIO
bits OIS3 and OIS2 in 8TCSR1 are ignored.)
 Select the input clock with bits CKS2 to CKS0 in 8TCR1, and start the 8TCNT count.
• Channels 2 and 3:
 In 16-bit count mode, TCORB2 and TCORB3 function as a 16-bit input capture register
when the ICE bit is set to 1 in 8TCSR3.
 Select rising edge, falling edge, or both edges as the input edge(s) for the input capture
signal (TMIO
bits OIS3 and OIS2 in 8TCSR3 are ignored.)
 Select the input clock with bits CKS2 to CKS0 in 8TCR3, and start the 8TCNT count.
260
or TMIO
1
) with bits OIS3 and OIS2 in 8TCSR1.
1
) with bits OIS3 and OIS2 in 8TCSR3.
3
) with bits OIS3 and OIS2 in 8TCSR0. (In 16-bit count mode, the settings of
1
) with bits OIS3 and OIS2 in 8TCSR2. (In 16-bit count mode, the settings of
3
). Rising edge, falling edge, or both edge detection
3

Advertisement

Table of Contents
loading

Table of Contents