beautypg.com

Renesas SH7641 User Manual

Page 615

background image

Section 18 Multi-Function Timer Pulse Unit (MTU)

Rev. 4.00 Sep. 14, 2005 Page 565 of 982

REJ09B0023-0400

Example of Setting Procedure for Waveform Output by Compare Match: Figure 18.6 shows
an example of the setting procedure for waveform output by compare match

Output selection

Select waveform output

mode

Set output timing

Start count operation

[1]

[2]

[3]

[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
until the first compare match occurs.

[2] Set the timing for compare match generation

in TGR.

[3] Set the CST bit in TSTR to 1 to start the

count operation.

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

Examples of Waveform Output Operation: Figure 18.7 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
such 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

H'0000

TIOCA

TIOCB

Time

TGRA

TGRB

No change

No change

No change

No change

1 output

0 output

Figure 18.7 Example of 0 Output/1 Output Operation

This manual is related to the following products: