Renesas H8S Series Hardware Manual page 455

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

Advertisement

Non-overlapping
PPG output
Select TGR functions
Set TGR values
TPU setup
Set counting operation
Select interrupt request
Set initial output data
Enable pulse output
Select output trigger
PPG setup
Set non-overlapping groups
Set next pulse
output data
TPU setup
Start counter
Compare match A?
Set next pulse
output data
Figure 11-6 Setup Procedure for Non-Overlapping Pulse Output (Example)
[1]
[2]
[3]
[4]
[5]
[6]
[7]
[8]
[9]
[10]
No
Yes
[11]
[1] Set TIOR to make TGRA and
TGRB an output compare registers
(with output disabled)
[2] Set the pulse output trigger period
in TGRB and the non-overlap
margin in TGRA.
[3] Select the counter clock source
with bits TPSC2 to TPSC0 in TCR.
Select the counter clear source
with bits CCLR1 and CCLR0.
[4] Enable the TGIA interrupt in TIER.
The DTC or DMAC can also be set
up to transfer data to NDR.
[5] Set the initial output values in
PODR.
[6] Set the DDR and NDER bits for the
pins to be used for pulse output to
1.
[7] Select the TPU compare match
event to be used as the pulse
output trigger in PCR.
[8] In PMR, select the groups that will
operate in non-overlap mode.
[9] Set the next pulse output values in
NDR.
[10] Set the CST bit in TSTR to 1 to
start the TCNT counter.
[11] At each TGIA interrupt, set the next
output values in NDR.
Rev.6.00 Oct.28.2004 page 427 of 1016
REJ09B0138-0600H

Advertisement

Table of Contents
loading

Table of Contents