English
Language : 

3069RF-ZTAT Datasheet, PDF (375/1003 Pages) Renesas Technology Corp – RENESAS 16-BIT SINGLE-CHIP MICROCOMPUTER
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.
[3] [4] Set the time at which the PWM
waveform should go to 0 in GRB.
[5] Set the PWM bit in TMDR to select
[4]
PWM mode. When PWM mode is
selected, regardless of the TIOR
contents, GRA and GRB become
output compare registers specifying
[5]
the times at which the PWM output
goes to 1 and 0. The TIOCA pin
automatically becomes the PWM
output pin. The TIOCB pin conforms
[6]
to the settings of bits IOB1 and IOB0
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.0, 09/04, page 353 of 978