Normal Tpc Output - Renesas F-ZTAT H8 Series Hardware Manual

Hide thumbs Also See for F-ZTAT H8 Series:
Table of Contents

Advertisement

11.3.3

Normal TPC Output

Sample Setup Procedure for Normal TPC Output: Figure 11.4 shows a sample procedure for
setting up normal TPC output.
Normal TPC output
Select GR functions
ITU setup
Select counting operation
Select interrupt request
Set initial output data
Port and
Enable TPC output
TPC setup
Select TPC output trigger
Set next TPC output data
ITU setup
Set next TPC output value
Set next TPC output data
Figure 11.4 Setup Procedure for Normal TPC Output (Example)
Set GRA value
Select port output
Start counter
Compare match?
Yes
Section 11 Programmable Timing Pattern Controller
1. Set TIOR to make GRA an output
compare register (with output inhibited).
2. Set the TPC output trigger period.
1
3. Select the counter clock source with
2
bits TPSC2 to TPSC0 in TCR. Select
the counter clear source with bits
CCLR1 and CCLR0.
3
4. Enable the IMFA interrupt in TIER. The
DMAC can also be set up to transfer
4
data to the next data register.
5. Set the initial output values in the DR
5
bits of the input/output port pins to be
used for TPC output.
6
6. Set the DDR bits of the input/output port
pins to be used for TPC output to 1.
7
7. Set the NDER bits of the pins to be
used for TPC output to 1.
8
8. Select the ITU compare match event to
be used as the TPC output trigger in
9
TPCR.
9. Set the next TPC output values in the
10
NDR bits.
10. Set the STR bit to 1 in TSTR to start the
timer counter.
No
11. At each IMFA interrupt, set the next
output values in the NDR bits.
11
Rev. 3.00 Mar 21, 2006 page 415 of 814
REJ09B0302-0300

Advertisement

Table of Contents
loading

Table of Contents