English
Language : 

HD6413007F20 Datasheet, PDF (358/798 Pages) Renesas Technology Corp – Hardware Manual Renesas 16-Bit Single-Chip Microcomputer H8 Family/H8/300H Series
9. 16-Bit Timer
Table 9.4 PWM Output Pins and Registers
Channel
0
1
2
Output Pin
TIOCA
0
TIOCA
1
TIOCA
2
1 Output
GRA0
GRA1
GRA2
0 Output
GRB0
GRB1
GRB2
Sample Setup Procedure for PWM Mode: Figure 9.26 shows a sample procedure for setting up
PWM mode.
PWM mode
Select counter clock
Select counter clear source
Set GRA
Set GRB
Select PWM mode
Start counter
PWM mode
1. Set bits TPSC2 to TPSC0 in 16TCR to
select the counter clock source. If an
external clock source is selected, set
bits CKEG1 and CKEG0 in 16TCR to
1
select the desired edge(s) of the
external clock signal.
2. Set bits CCLR1 and CCLR0 in 16TCR
2
to select the counter clear source.
3. Set the time at which the PWM
waveform should go to 1 in GRA.
4. Set the time at which the PWM
3
waveform should go to 0 in GRB.
5. Set the PWM bit in TMDR to select
PWM mode. When PWM mode is
4
selected, regardless of the TIOR
contents, GRA and GRB become
output compare registers specifying
the times at which the PWM output
5
goes to 1 and 0. The TIOCA pin
automatically becomes the PWM
output pin. The TIOCB pin conforms
to the settings of bits IOB1 and IOB0
6
in TIOR. If TIOCB output is not
desired, clear both IOB1 and IOB0 to 0.
6. Set the STR bit to 1 in TSTR to start
the timer counter.
Figure 9.26 Setup Procedure for PWM Mode (Example)
Rev.5.00 Sep. 12, 2007 Page 328 of 764
REJ09B0396-0500