mc9s12c32mpb16 Freescale Semiconductor, Inc, mc9s12c32mpb16 Datasheet - Page 368

no-image

mc9s12c32mpb16

Manufacturer Part Number
mc9s12c32mpb16
Description
Hcs12 Microcontrollers
Manufacturer
Freescale Semiconductor, Inc
Datasheet
Chapter 12 Pulse-Width Modulator (PWM8B6CV1) Block Description
Reference
To calculate the output duty cycle (high time as a % of period) for a particular channel:
368
Module Base + 0x0018
Module Base + 0x0019
Module Base + 0x001A
Reset
Reset
Reset
W
W
W
R
R
R
Polarity = 0 (PPOLx = 0)
Polarity = 1 (PPOLx = 1)
For boundary case programming values, please refer to
Duty cycle = [(PWMPERx PWMDTYx)/PWMPERx] * 100%
Duty cycle = [PWMDTYx / PWMPERx] * 100%
Section 12.4.2.3, “PWM Period and Duty,”
Bit 7
Bit 7
Bit 7
1
1
1
7
7
7
Reads of this register return the most recent value written. Reads do not
necessarily return the value of the currently active duty due to the double
buffering scheme.
Depending on the polarity bit, the duty registers will contain the count of
either the high time or the low time. If the polarity bit is 1, the output starts
high and then goes low when the duty count is reached, so the duty registers
contain a count of the high time. If the polarity bit is 0, the output starts low
and then goes high when the duty count is reached, so the duty registers
contain a count of the low time.
Figure 12-27. PWM Channel Duty Registers (PWMDTY0)
Figure 12-28. PWM Channel Duty Registers (PWMDTY1)
Figure 12-29. PWM Channel Duty Registers (PWMDTY2)
6
1
6
1
6
1
6
6
6
MC9S12C-Family / MC9S12GC-Family
5
1
5
1
5
1
5
5
5
Rev 01.23
NOTE
NOTE
4
1
4
1
4
1
4
4
4
for more information.
Section 12.4.2.8, “PWM Boundary Cases.”
3
1
3
1
3
1
3
3
3
2
1
2
1
2
1
2
2
2
Freescale Semiconductor
1
1
1
1
1
1
1
1
1
Bit 0
Bit 0
Bit 0
1
1
1
0
0
0

Related parts for mc9s12c32mpb16