Rev. 2.0, 11/00, page 429 of 1037
21.3
14-Bit PWM Operation
When using the 14-bit PWM, set the registers in this sequence:
(1) Set bit PMR40 to 1 in port mode register 4 (PMR4) so that pin P40/PWM14 is designated for
PWM output.
(2) Set bit PWCR0 in the PWM control register (PWCR) to select a conversion period of either
32768/
φ
(PWCR0 = 1) or 16384/
φ
(PWCR0 = 0).
(3) Set the output waveform data in PWM data registers U and L (PWDRU, PWDRL). Be sure
to write byte data first to PWDRL and then to PWDRU. When the data is written in
PWDRU, the contents of these registers are latched in the PWM waveform generator, and the
PWM waveform generation data is updated in synchronization with internal signals.
One conversion period consists of 64 pulses, as shown in figure 21.2. The total high-level width
during this period (T
H
) corresponds to the data in PWDRU and PWDRL. This relation can be
expressed as follows:
T
H
= (data value in PWDRU and PWDRL + 64)
×
t
φ
/2
where t
φ
is the period of PWM clock input: 2/
φ
(bit PWCR0 = 0) or 4/
φ
(bit PWCR0 = 1).
If the data value in PWDRU and PWDRL is from H'3FC0 to H'3FFF, the PWM output stays
high.
When the data value is H'0000, T
H
is calculated as follows:
T
H
= 64
×
t
φ
/2 = 32
⋅
t
φ
t H64
t H63
t H3
t H2
t H1
T H = t H1 + t H2 + t H3 + ... + t H64
t f1 = t f2 = t f3 = ... = t f64
t f1
t f2
t f63
t f64
1 conversion period
Figure 21.2 Waveform Output by 14-Bit PWM
Содержание Hitachi H8S/2191
Страница 123: ...Rev 2 0 11 00 page 96 of 1037...
Страница 149: ...Rev 2 0 11 00 page 122 of 1037...
Страница 197: ...Rev 2 0 11 00 page 170 of 1037...
Страница 247: ...Rev 2 0 11 00 page 220 of 1037...
Страница 249: ...Rev 2 0 11 00 page 222 of 1037...
Страница 347: ...Rev 2 0 11 00 page 320 of 1037...
Страница 357: ...Rev 2 0 11 00 page 330 of 1037...
Страница 417: ...Rev 2 0 11 00 page 390 of 1037...
Страница 431: ...Rev 2 0 11 00 page 404 of 1037...
Страница 439: ...Rev 2 0 11 00 page 412 of 1037...
Страница 457: ...Rev 2 0 11 00 page 430 of 1037...
Страница 525: ...Rev 2 0 11 00 page 498 of 1037...
Страница 543: ...Rev 2 0 11 00 page 516 of 1037...
Страница 639: ...Rev 2 0 11 00 page 612 of 1037 28 1 2 Block Diagram Figure 28 1 shows a block diagram of the servo circuits...
Страница 845: ...Rev 2 0 11 00 page 818 of 1037...