RX610 Group
16. Programmable Pulse Generator (PPG)
R01UH0032EJ0120 Rev.1.20
Page 549 of 1006
Feb 20, 2013
16.3.2
Sample Setup Procedure for Normal Pulse Output
Figures 16.6 and 16.7 show sample procedures for setting normal pulse output.
(1)
PPG0 Setting
Select TGR functions
Set TGRA values
Set counting operations
Select interrupt sources
Set initial output values
Enable pulse output
Select output triggers
Set next pulse output values
Start counter
Set next pulse output values
No
Yes
Compare match
Normal PPG output
PPG0 setup
[1]
[2]
[3]
[4]
[5]
[6]
[7]
[8]
[9]
[10]
[1] Set TIOR of the TPU (unit 0) to make TGRA an output
compare register (output disabled).
[2] Set the PPG output trigger period.
[3] Select the counter clock source with the TPSC[2:0] bits
in TCR. Select the counter clear source with the
CCLR[2:0] bits.
[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 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.
TPU (unit 0) setup
TPU (unit 0) setup
Figure 16.6 Sample Setup Procedure for Normal Pulse Output (PPG0 Setting)
Summary of Contents for RX600 Series
Page 1006: ...RX610 Group R01UH0032EJ0120 ...