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...