Sign in

username:

password:



Not a member?

Search 68hc12



Search tips

Subscribe to 68hc12



68hc12 by Keywords

68HC1 | 812A4 | 9S12DP256 | Bootloader | CodeWarrior | D60A | Debugger | DP256 | ECT | EEPROM | EVB | Flash | HC1 | HCS12 | I2C | IAR | ICC1 | Interrupts | LCD | M68KIT912DP256 | MC9S12DP256 | MC9S12DP256B | Metrowerks | Motor | MSCAN | Multilink | PLL | Quadrature | SDI | SPI | Transceiver | XFC

Ads

Discussion Groups

Join our technical discussions about Freescale Microcontrollers: M68HC12. (Freescale Semiconductor is a Subsidiary of Motorola).

PWM - paulwilliam_pwilliams - Mar 5 5:46:22 2008

Hi all,
Just making sure that this is the correct procedure to initialize PWM
output for channel 0. i am using a CardS12 MC9S12DP512, programmed by
ICC12.

Here is the code that i am using to start the PWM:
// Initiate PWM Port
void init_PWM(void){
PWMPOL =0xFF; // Sets PWM polarity High start, low end
PWMCLK =0x00; // Select clock source A
PWMPRCLK=0x00; // clock prescale set to zero
PWMCAE =0x00; // Left aligned mode
PWMCTL =0x00; // Do not concatenate, continuous running
PWMSCLA =0x05; // PWM scale clock A = 0x01
PWMPER0 =0x80; // Period for PWM 0
PWMDTY0 =0x40; // Duty for PWM 0
PWME =0xFF; // Enable channel 0 and 1 for output
}
// End code

Is there any reason that the PWM output should not be "seen" at PM0.

Regards,
Paul



(You need to be a member of 68hc12 -- send a blank email to 68hc12-subscribe@yahoogroups.com )