Pulse-Width Modulator (S12PWM8B8CV1)
S12XS Family Reference Manual, Rev. 1.13
392
Freescale Semiconductor
As an example of a center aligned output, consider the following case:
Clock Source = E, where E = 10 MHz (100 ns period)
PPOLx = 0
PWMPERx = 4
PWMDTYx = 1
PWMx Frequency = 10 MHz/8 = 1.25 MHz
PWMx Period = 800 ns
PWMx Duty Cycle = 3/4 *100% = 75%
Shown in
is the output waveform generated.
Figure 13-23. PWM Center Aligned Output Example Waveform
13.4.2.7
PWM 16-Bit Functions
The PWM timer also has the option of generating 8-channels of 8-bits or 4-channels of 16-bits for greater
PWM resolution. This 16-bit channel option is achieved through the concatenation of two 8-bit channels.
The PWMCTL register contains four control bits, each of which is used to concatenate a pair of PWM
channels into one 16-bit channel. Channels 6 and 7 are concatenated with the CON67 bit, channels 4 and
5 are concatenated with the CON45 bit, channels 2 and 3 are concatenated with the CON23 bit, and
channels 0 and 1 are concatenated with the CON01 bit.
NOTE
Change these bits only when both corresponding channels are disabled.
When channels 6 and 7 are concatenated, channel 6 registers become the high order bytes of the double
byte channel, as shown in
. Similarly, when channels 4 and 5 are concatenated, channel 4
registers become the high order bytes of the double byte channel. When channels 2 and 3 are concatenated,
channel 2 registers become the high order bytes of the double byte channel. When channels 0 and 1 are
concatenated, channel 0 registers become the high order bytes of the double byte channel.
When using the 16-bit concatenated mode, the clock source is determined by the low order 8-bit channel
clock select control bits. That is channel 7 when channels 6 and 7 are concatenated, channel 5 when
channels 4 and 5 are concatenated, channel 3 when channels 2 and 3 are concatenated, and channel 1 when
channels 0 and 1 are concatenated. The resulting PWM is output to the pins of the corresponding low order
8-bit channel as also shown in
. The polarity of the resulting PWM output is controlled by the
PPOLx bit of the corresponding low order 8-bit channel as well.
E = 100 ns
DUTY CYCLE = 75%
E = 100 ns
PERIOD = 800 ns
Содержание MC9S12XS128
Страница 4: ...S12XS Family Reference Manual Rev 1 13 4 Freescale Semiconductor ...
Страница 58: ...Device Overview S12XS Family S12XS Family Reference Manual Rev 1 13 58 Freescale Semiconductor ...
Страница 150: ...Memory Mapping Control S12XMMCV4 S12XS Family Reference Manual Rev 1 13 150 Freescale Semiconductor ...
Страница 168: ...Interrupt S12XINTV2 S12XS Family Reference Manual Rev 1 13 168 Freescale Semiconductor ...
Страница 194: ...Background Debug Module S12XBDMV2 S12XS Family Reference Manual Rev 1 13 194 Freescale Semiconductor ...
Страница 364: ...Periodic Interrupt Timer S12PIT24B4CV1 S12XS Family Reference Manual Rev 1 13 364 Freescale Semiconductor ...
Страница 396: ...Pulse Width Modulator S12PWM8B8CV1 S12XS Family Reference Manual Rev 1 13 396 Freescale Semiconductor ...
Страница 506: ...Voltage Regulator S12VREGL3V3V1 S12XS Family Reference Manual Rev 1 13 506 Freescale Semiconductor ...
Страница 736: ...Ordering Information S12XS Family Reference Manual Rev 1 13 736 Freescale Semiconductor ...
Страница 737: ......