Non-Overlapping Pulse Output - Hitachi H8S/2646 Hardware Manual

Hitachi 16-bit single-chip microcomputer h8s/2646 series
Table of Contents

Advertisement

11.3.4

Non-Overlapping Pulse Output

Sample Setup Procedure for Non-Overlapping Pulse Output: Figure 11-6 shows a sample
procedure for setting up non-overlapping pulse output.
Select TGR functions
TPU setup
Set counting operation
Select interrupt request
Set initial output data
PPG setup
Set non-overlapping groups
TPU setup
Figure 11-6 Setup Procedure for Non-Overlapping Pulse Output (Example)
Non-overlapping
PPG output
Set TGR values
Enable pulse output
Select output trigger
Set next pulse
output data
Start counter
Compare match?
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]
[3] Select the counter clock source
with bits TPSC2 to TPSC0 in TCR.
[4]
Select the counter clear source
with bits CCLR1 and CCLR0.
[5]
[4] Enable the TGIA interrupt in TIER.
The DTC can also be set up to
[6]
transfer data to NDR.
[7]
[5] Set the initial output values in
PODR.
[8]
[6] Set the DDR and NDER bits for the
pins to be used for pulse output to
[9]
1.
[7] Select the TPU compare match
[10]
event to be used as the pulse
output trigger in PCR.
No
[8] In PMR, select the groups that will
operate in non-overlap mode.
[9] Set the next pulse output values in
[11]
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.
405

Advertisement

Table of Contents
loading

Table of Contents