Non-Overlapping Tpc Output - Hitachi H8/3032 Series Hardware Manual

Table of Contents

Advertisement

9.3.4 Non-Overlapping TPC Output

Sample Setup Procedure for Non-Overlapping TPC Output: Figure 9-6 shows a sample
procedure for setting up non-overlapping TPC output.
ITU setup
Port and
TPC setup
ITU setup
Downloaded from
Elcodis.com
electronic components distributor
Non-overlapping
TPC output
Select GR functions
Set GR values
Select counting operation
Select interrupt requests
Set initial output data
Set up TPC output
Enable TPC transfer
Select TPC transfer trigger
Select non-overlapping groups
Set next TPC output data
Start counter
Compare match A?
Yes
Set next TPC output data
Figure 9-6 Setup Procedure for Non-Overlapping TPC Output (Example)
1
1.
Set TIOR to make GRA and GRB output
compare registers (with output inhibited).
2.
Set the TPC output trigger period in GRB
2
and the non-overlap margin in GRA.
3.
Select the counter clock source with bits
3
TPSC2 to TPSC0 in TCR. Select the counter
clear source with bits CCLR1 and CCLR0.
4
4.
Enable the IMFA interrupt in TIER.
5.
Set the initial output values in the DR bits
of the input/output port pins to be used for
5
TPC output.
6.
Set the DDR bits of the input/output port pins
6
to be used for TPC output to 1.
7.
Set the NDER bits of the pins to be used for
TPC output to 1.
7
8.
In TPCR, select the ITU compare match
event to be used as the TPC output trigger.
8
9.
In TPMR, select the groups that will operate
in non-overlap mode.
9
10.
Set the next TPC output values in the NDR
bits.
11.
Set the STR bit to 1 in TSTR to start the timer
10
counter.
12.
At each IMFA interrupt, write the next output
value in the NDR bits.
11
No
12
290

Advertisement

Table of Contents
loading

Table of Contents