Figure 10.9 Example Of Setting Procedure For Waveform Output By Compare Match; Figure 10.10 Example Of 0 Output/1 Output Operation - Hitachi H8S/2215 Series Hardware Manual

Hitachi single-chip microcomputer
Table of Contents

Advertisement

Output selection
Select waveform output mode
Set output timing
Start count operation
<Waveform output>

Figure 10.9 Example of Setting Procedure for Waveform Output by Compare Match

2. Examples of waveform output operation
Figure 10.10 shows an example of 0 output/1 output. In this example TCNT has been
designated as a free-running counter, and settings have been made so that 1 is output by
compare match A, and 0 is output by compare match B. When the set level and the pin level
coincide, the pin level does not change.
TCNT value
H'FFFF
TGRA
TGRB
H'0000
TIOCA
TIOCB

Figure 10.10 Example of 0 Output/1 Output Operation

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.
[1]
Select initial value 0 output or 1 output, and
compare match output value 0 output, 1 output,
or toggle output, by means of TIOR. The set
initial value is output at the TIOC pin unit the
first compare match occurs.
[2]
Set the timing for compare match generation in
[1]
TGR.
[3]
Set the CST bit in TSTR to 1 to start the count
operation.
[2]
[3]
No change
No change
No change
1 output
0 output
No change
Rev. 3.0, 10/02, page 295 of 686
Time

Advertisement

Table of Contents
loading

Table of Contents