Download Print this page

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

16-bit single-chip microcomputer
Hide thumbs Also See for F-ZTAT H8 Series:

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 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
1.
Set TIOR to make GRA an output compare
register (with output inhibited).
2.
Set the TPC output trigger period.
2
3.
Select the counter clock source with bits
TPSC2 to TPSC0 in TCR. Select the counter
3
clear source with bits CCLR1 and CCLR0.
4.
Enable the IMFA interrupt in TIER.
4
The DMAC can also be set up to transfer
data to the next data register.
5.
Set the initial output values in the DR bits
5
of the input/output port pins to be used for
TPC output.
6.
Set the DDR bits of the input/output port
6
pins to be used for TPC output to 1.
7.
Set the NDER bits of the pins to be used for
7
TPC output to 1.
8.
Select the ITU compare match event to be
8
used as the TPC output trigger in TPCR.
9.
Set the next TPC output values in the NDR bits.
10.
Set the STR bit to 1 in TSTR to start the
9
timer counter.
11.
At each IMFA interrupt, set the next output
10
values in the NDR bits.
No
11
Rev. 7.00 Sep 21, 2005 page 429 of 878
REJ09B0259-0700

Hide quick links:

Advertisement

loading