Renesas H8S Series Hardware Manual page 403

16-bit single-chip microcomputer
Hide thumbs Also See for H8S Series:
Table of Contents

Advertisement

Figure 10-11 shows an example of toggle output.
In this example TCNT has been designated as a periodic counter (with counter clearing performed by compare match
B), and settings have been made so that output is toggled by both compare match A and compare match B.
TCNT value
H'FFFF
TGRB
TGRA
H'0000
TIOCB
TIOCA
Input Capture Function: The TCNT value can be transferred to TGR on detection of the TIOC pin input edge.
Rising edge, falling edge, or both edges can be selected as the detected edge. For channels 0, 1, 3, and 4, it is also possible
to specify another channel's counter input clock or compare match signal as the input capture source.
Note: When another channel's counter input clock is used as the input capture input for channels 0 and 3, ø/1 should not
be selected as the counter input clock used for input capture input. Input capture will not be generated if ø/1 is
selected.
• Example of input capture operation setting procedure
Figure 10-12 shows an example of the input capture operation setting procedure.
Select input capture input
<Input capture operation>
Figure 10-12 Example of Input Capture Operation Setting Procedure
Figure 10-11 Example of Toggle Output Operation
Input selection
Start count
Counter cleared by TGRB compare match
[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.
[1]
[2] Set the CST bit in TSTR to 1 to start the count
operation.
[2]
Time
Toggle output
Toggle output
Rev.6.00 Oct.28.2004 page 375 of 1016
REJ09B0138-0600H

Advertisement

Table of Contents
loading

Table of Contents