English
Language : 

HD64F3039F18 Datasheet, PDF (270/710 Pages) Renesas Technology Corp – Renesas 16-Bit Single-Chip Microcomputer H8 Family / H8/300H Series
Section 8 16-Bit Integrated Timer Unit (ITU)
Sample Setup Procedure for PWM Mode
Figure 8.28 shows a sample procedure for setting up PWM mode.
PWM mode
1. Set bits TPSC2 to TPSC0 in TCR to
select the counter clock source. If an
external clock source is selected, set
Select counter clock
bits CKEG1 and CKEG0 in TCR to
1
select the desired edge(s) of the
external clock signal.
2. Set bits CCLR1 and CCLR0 in TCR
Select counter clear source
2
to select the counter clear source.
3. Set the time at which the PWM
waveform should go to 1 in GRA.
Set 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
Set GRB
4
selected, regardless of the TIOR
contents, GRA and GRB become
output compare registers specifying
the times at which the PWM
Select PWM mode
5
goes to 1 and 0. The TIOCA pin
automatically becomes the PWM
output pin. The TIOCB pin conforms
Start counter
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
PWM mode
the timer counter.
Figure 8.28 Setup Procedure for PWM Mode (Example)
Rev.3.00 Mar. 26, 2007 Page 246 of 682
REJ09B0353-0300