AnsweredAssumed Answered

PWM outs in ADUC7060

Question asked by Anton1000 on Feb 11, 2011
Latest reply on Nov 1, 2013 by jakpil

Coud you help me, I want get independent pwm outs from 0 to 5. This is code init 12 bit resolutions pwm 1,25 kGz:

     void per_PWM_Init (void)

     {

          PWMCON     = BIT0;                     // PWM Standard mode, UCLK/2, PWM Trip interrupt enabled

 

          PWM0COM0 = 0xFFF;                    //     Configure PWM0 output high trigger time

          PWM0LEN  = 0xFFF;                         //     Configure PWM1 output high trigger time

 

          PWM1COM0 = 0xFFF;          //     Configure PWM2 output high trigger time

          PWM1LEN  = 0xFFF;                         //     Configure PWM3 output high trigger time

 

          PWM2COM0 = 0xFFF;          //     Configure PWM4 output high trigger time

          PWM2LEN  = 0xFFF;          //     Configure PWM6 output high trigger time

}

 

 

void PWM_Set_0(unsigned int pwm)

{

PWM0COM1 = pwm;          //     Configure PWM0 output

}

 

void PWM_Set_1(unsigned int pwm)

{

PWM0COM2 = pwm;          //     Configure PWM1 output

}

 

void PWM_Set_2(unsigned int pwm)

{

PWM1COM1 = pwm;          //     Configure PWM2 output

}

 

void PWM_Set_3(unsigned int pwm)

{

PWM1COM2 = pwm;          //     Configure PWM3 output

}

 

void PWM_Set_4(unsigned int pwm)

{

PWM2COM1 = pwm;          //     Configure PWM4 output

}

 

void PWM_Set_5(unsigned int pwm)

{

PWM2COM2 = pwm;          //     Configure PWM5 output

}

 

But when I change pwm0 pwm1 change too.

Outcomes