LFDAS12XSFT Freescale Semiconductor, LFDAS12XSFT Datasheet - Page 381

no-image

LFDAS12XSFT

Manufacturer Part Number
LFDAS12XSFT
Description
HARDWARE MC9S12XS 80-PIN
Manufacturer
Freescale Semiconductor
Datasheet

Specifications of LFDAS12XSFT

Module/board Type
*
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
For Use With/related Products
-
13.3.2.14 PWM Channel Duty Registers (PWMDTYx)
There is a dedicated duty register for each channel. The value in this register determines the duty of the
associated PWM channel. The duty value is compared to the counter and if it is equal to the counter value
a match occurs and the output changes state.
The duty registers for each channel are double buffered so that if they change while the channel is enabled,
the change will NOT take effect until one of the following occurs:
In this way, the output of the PWM will always be either the old duty waveform or the new duty waveform,
not some variation in between. If the channel is not enabled, then writes to the duty register will go directly
to the latches as well as the buffer.
See
To calculate the output duty cycle (high time as a% of period) for a particular channel:
For boundary case programming values, please refer to
Read: Anytime
Freescale Semiconductor
Module Base + 0x001C = PWMDTY0, 0x001D = PWMDTY1, 0x001E = PWMDTY2, 0x001F = PWMDTY3
Module Base + 0x0020 = PWMDTY4, 0x0021 = PWMDTY5, 0x0022 = PWMDTY6, 0x0023 = PWMDTY7
Reset
Section 13.4.2.3, “PWM Period and Duty”
W
R
The effective period ends
The counter is written (counter resets to $00)
The channel is disabled
Polarity = 0 (PPOL x =0)
Polarity = 1 (PPOLx = 1)
Duty Cycle = [(PWMPERx-PWMDTYx)/PWMPERx] * 100%
Duty Cycle = [PWMDTYx / PWMPERx] * 100%
Bit 7
1
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 one, 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 zero, 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 13-16. PWM Channel Duty Registers (PWMDTYx)
1
6
6
S12XS Family Reference Manual, Rev. 1.11
1
5
5
for more information.
NOTE
NOTE
1
4
4
Section 13.4.2.8, “PWM Boundary
1
3
3
Pulse-Width Modulator (S12PWM8B8CV1)
1
2
2
1
1
1
Cases”.
Bit 0
1
0
381

Related parts for LFDAS12XSFT