219
PWM Operation: In PWM mode, PWM waveforms are output from the FTIOB, FTIOC, and
FTIOD pins. PWM waveforms are generated by using GRA as the period register and GRB, GRC,
and GRD as duty registers. The output level of each pin depends on the corresponding timer
output level set bit (TOB, TOC, or TOD) in TCRW. For example, when TOB is 1, the FTIOB
output goes to 0 at compare match B and to 1 at compare match A. When TOB is 0, the FTIOB
output goes to 1 at compare match B and to 0 at compare match A. Thus the compare match
output level settings in the timer I/O control register are ignored for the output pin set to PWM
mode.
If the same value is set in the period register and the duty register, the output does not change
when a compare match occurs.
Up to three-phase PWM waveforms can be output.
Figure 12.18 shows an example of a procedure for setting up PWM mode.
Select counter clock
PWM mode
Select counter clear
source
Select PWM mode
PWM mode
1
2
3
Select output level
4
Set GRs
5
Start counter
6
1. Set bits CKS2 to CKS0 in TCRW
to select the counter clock.
2. Set bit CCLR in TCRW to select
the counter clear source.
3. Set bits PWMB to PWMD in
TMRW to select the PWM mode.
4. Set bits TOB to TOD in TCRW to
select the initial output value.
5. Set the period in GRA and the
duty in other GRs.
6. Set the CTS bit in TMRW to 1 to
start the timer counter.
Figure 12.18 Setup Procedure for PWM Mode (Example)
Содержание H8/3660
Страница 4: ......
Страница 26: ...10 ...
Страница 82: ...66 ...
Страница 152: ...136 ...
Страница 154: ...138 ...
Страница 260: ...244 ...
Страница 408: ...392 18 5 Output Load Circuit VCC 2 4 kΩ 12 kΩ 30 pF LSI output pin Figure 18 7 Output Load Condition ...
Страница 457: ...441 DEC VIN CH3 to CH0 A D converter Internal data bus Figure C 17 Port B Block Diagram PB7 to PB0 ...