mc68hc908lb8 Freescale Semiconductor, Inc, mc68hc908lb8 Datasheet - Page 156

no-image

mc68hc908lb8

Manufacturer Part Number
mc68hc908lb8
Description
M68hc08 Microcontrollers Microcontroller
Manufacturer
Freescale Semiconductor, Inc
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
mc68hc908lb8CDWE
Manufacturer:
FREESCALE
Quantity:
1 831
Part Number:
mc68hc908lb8CDWE
Manufacturer:
FREESCALE
Quantity:
20 000
Part Number:
mc68hc908lb8CPE
Manufacturer:
IR
Quantity:
10
Pulse Width Modulator with Fault Input (PWM)
PWMF — PWM Reload Flag
LDOK— Load OK Bit
PWMEN — PWM Module Enable Bit
15.8.5 PWM Control Register 2
PWM control register 2 (PCTL2) controls the PWM load frequency, PWM channel enabling/disabling, the
PWM polarity, the PWM correction method, and the PWM counter prescaler. For ease of software and to
avoid erroneous PWM periods, some of these register bits are buffered. The PWM generator will not use
the prescaler value until the LDOK bit has been set, and a new PWM cycle is starting. The load frequency
bits are not used until the current load cycle is complete.
See
156
This read/write bit is set at the beginning of every reload cycle regardless of the state of the LDOK bit.
This bit is cleared by reading PWM control register 1 with the PWMF flag set, then writing a 0 to PWMF.
If another reload occurs before the clearing sequence is complete, then writing 0 to PWMF has no
effect.
This read/write bit loads the prescaler bits of the PMCTL2 register and the entire PMMODH/L and
PWMVALH/L registers into a set of buffers. The buffered prescaler divisor, PWM counter modulus
value, and PWM pulse will take effect at the next PWM load. Set LDOK by reading it when it is 0 and
then writing a 1 to it. LDOK is automatically cleared after the new values are loaded or can be manually
cleared before a reload by writing a 0 to it. Reset clears LDOK.
This read/write bit enables and disables the PWM generator and the PWM pins. When PWMEN is
clear, the PWM generator is disabled and the PWM pins are in the high-impedance state.
When the PWMEN bit is set, the PWM generator and PWM pins are activated.
For more information, see
Figure
1 = New reload cycle began
0 = New reload cycle has not begun
1 = Load prescaler, modulus, and PWM values
0 = Do not load new modulus, prescaler, and PWM values
1 = PWM generator and PWM pins enabled
0 = PWM generator and PWM pins disabled
15-21.
When PWMINT is cleared, pending CPU interrupts are inhibited.
When PWMF is cleared, pending PWM CPU interrupts are cleared (not
including fault interrupts).
The user should initialize the PWM registers and set the LDOK bit before
enabling the PWM. A PWM CPU interrupt request can still be generated
when LDOK is 0.
The user should initialize this register before enabling the PWM.
15.6 Initialization and the PWMEN
MC68HC908LB8 Data Sheet, Rev. 1
NOTE
NOTE
NOTE
NOTE
Bit.
Freescale Semiconductor

Related parts for mc68hc908lb8