English
Language : 

H8SX1651 Datasheet, PDF (523/812 Pages) Renesas Technology Corp – Renesas 32-Bit CISC Microcomputer H8SX Family / H8SX/1600 Series
Section 11 Programmable Pulse Generator (PPG)
11.4.2 Sample Setup Procedure for Normal Pulse Output
Figure 11.4 shows a sample procedure for setting up normal pulse output.
TPU setup
PPG setup
TPU setup
Normal PPG output
Select TGR functions [1]
Set TGRA value
[2]
Set counting operation [3]
Select interrupt request [4]
Set initial output data [5]
Enable pulse output
[6]
Select output trigger
[7]
Set next pulse
[8]
output data
Start counter
Compare match?
Yes
Set next pulse
output data
[9]
No
[10]
[1] Set TIOR to make TGRA an output
compare register (with output disabled).
[2] Set the PPG output trigger cycle.
[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 bits in NDER for the pins to be
used for pulse output to 1.
[7] Select the TPU compare match event to
be used as the output trigger in PCR.
[8] Set the next pulse output values in NDR.
[9] Set the CST bit in TSTR to 1 to start the
TCNT counter.
[10] At each TGIA interrupt, set the next
output values in NDR.
Figure 11.4 Setup Procedure for Normal Pulse Output (Example)
Rev.2.00 Jun. 28, 2007 Page 499 of 784
REJ09B248-0200