AnsweredAssumed Answered

ADuC842 PWM Generation

Question asked by sji367 on Jun 16, 2015
Latest reply on Jun 19, 2015 by sji367

I am having difficulties outputting a PWM signal on my ADuC842. Right now nothing is being outputted on P2.7.

 

 

void main (void)

{

     PWMCON = 0x13; // (00010011) Sets the PWMCON to mode 1, counter to Selected CLK/1 and CLK = fVCO = 16.777216 MHz

     PWM0L = 0x20C4; // (8388) Sets duty cycle to ~25% (SLOW)

     PWM1L = 0x4312; // (33554) Sets the output rate of 500 Hz (16.777 MHz/33554)

     PWM0H = 0x20C4; // (8388) Sets duty cycle to ~25% (SLOW)

     PWM1H = 0x4312; // (33554) Sets the output rate of 500 Hz (16.777 MHz/33554)

}

Outcomes