HD643303x Hitachi, HD643303x Datasheet - Page 238

no-image

HD643303x

Manufacturer Part Number
HD643303x
Description
Hitachi Microcomputer
Manufacturer
Hitachi
Datasheet
Sample Setup Procedure for PWM Mode: Figure 8-28 shows a sample procedure for setting up
PWM mode.
Select counter clear source
Select counter clock
Select PWM mode
Start counter
PWM mode
PWM mode
Figure 8-28 Setup Procedure for PWM Mode (Example)
Set GRA
Set GRB
1
2
3
4
5
6
223
1. Set bits TPSC2 to TPSC0 in TCR to
2. Set bits CCLR1 and CCLR0 in TCR
3. Set the time at which the PWM
4. Set the time at which the PWM
5. Set the PWM bit in TMDR to select
6. Set the STR bit to 1 in TSTR to start
select the counter clock source. If an
external clock source is selected, set
bits CKEG1 and CKEG0 in TCR to
select the desired edge(s) of the
external clock signal.
to select the counter clear source.
waveform should go to 1 in GRA.
waveform should go to 0 in GRB.
PWM mode. When PWM mode is
selected, regardless of the TIOR
contents, GRA and GRB become
output compare registers specifying
the times at which the PWM
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
in TIOR. If TIOCB output is not
desired, clear both IOB1 and IOB0 to 0.
the timer counter.

Related parts for HD643303x