Sample Setup Procedure For Non-Overlapping Pulse Output; Figure 12.8 Setup Procedure For Non-Overlapping Pulse Output (Example) - Hitachi H8S/2628 Hardware Manual

H8s/2628 series 16-bit single-chip microcomputer
Table of Contents

Advertisement

12.4.6

Sample Setup Procedure for Non-Overlapping Pulse Output

Figure 12.8 shows a sample procedure for setting up non-overlapping pulse output.
TPU setup
PPG setup
TPU setup

Figure 12.8 Setup Procedure for Non-Overlapping Pulse Output (Example)

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

Advertisement

Table of Contents
loading

This manual is also suitable for:

Hd64f2628Hd6432628H8s/2627Hd6432627

Table of Contents