This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

PWM based LED Flickering Problem

Other Parts Discussed in Thread: MSP430F67641

Hello All

I am working  on SPI based RGB led and i am controlling the brightness of the rgb led using PWM.

I use msp430f67641 mcu. I facing the problem of the flickering of  the led when the duty cycle less than 100% and at 100% duty cycle it is working fine.

i configure the clock at 16 Mhz.

my code is:

void rgb_led_pwm(void)
{
      // Configure RGB Led Pins As Output and PWM control 
     P3DIR |= BIT3;
    P3SEL |= BIT3;

   TA0CCR0 = 1000-1; // PWM Per`iod
   TA0CCTL2 = OUTMOD_7; // CCR2 reset/set
   TA0CCR2 = 0; // CCR2 PWM duty cycle 
   TA0CTL = TASSEL_2 | MC_1 | TACLR; // ACLK, up mode, clear TAR
}

i stuck here..plz give me some solution...

**Attention** This is a public forum