Section 10 Programmable Pulse Generator (PPG)
Rev. 3.00 Mar. 14, 2006 Page 357 of 804
REJ09B0104-0300
10.4.2
Sample Setup Procedure for Normal Pulse Output
Figure 10.4 shows a sample procedure for setting up normal pulse output.
Select TGR functions
[1]
Set TGRA value
Set counting operation
Select interrupt request
Set initial output data
Enable pulse output
Select output trigger
Set next pulse
output data
Start counter
Set next pulse
output data
Normal PPG output
No
Yes
TPU setup
PPG setup
TPU setup
[2]
[3]
[4]
[5]
[6]
[7]
[8]
[9]
[10]
Compare match?
[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
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 10.4 Setup Procedure for Normal Pulse Output (Example)
electronic components distributor
Содержание H8SX series
Страница 2: ...Rev 3 00 Mar 14 2006 Page ii of xxxviii Downloaded from Elcodis com electronic components distributor...
Страница 22: ...Rev 3 00 Mar 14 2006 Page xxii of xxxviii Downloaded from Elcodis com electronic components distributor...
Страница 32: ...Rev 3 00 Mar 14 2006 Page xxxii of xxxviii Downloaded from Elcodis com electronic components distributor...
Страница 38: ...Rev 3 00 Mar 14 2006 Page xxxviii of xxxviii Downloaded from Elcodis com electronic components distributor...
Страница 845: ...Downloaded from Elcodis com electronic components distributor...
Страница 846: ...H8SX 1520 Group Hardware Manual Downloaded from Elcodis com electronic components distributor...