Hello sir,
I am working on the PWM based project. I use
1> MSP430F67641
2> PWM pin
--> PM_TA2.0
--> PM_TA2.1
so how i initialize of both as PWM pin.
My code is:-
void touch_led1(void) // pin50 TA2_1
{
TA2CCR0 = 512 - 1; // PWM Period
TA2CCTL1 = OUTMOD_7; // CCR1 reset/set
TA2CCR1 = 0; // CCR1 PWM duty cycle
TA2CTL = TASSEL_1 | MC_1 | TACLR; // ACLK, up mode, clear TAR
}
void touch_led2(void) // pin49 TA2_0
{
TA2CCR0 = 512 - 1; // PWM Period
TA2CCTL0 = OUTMOD_7; // CCR0 reset/set
TA2CCR0 = 0; // CCR0 PWM duty cycle
TA2CTL = TASSEL_1 | MC_1 | TACLR; // ACLK, up mode, clear TAR
}
i have confusion in the initialization of touch_led2().
Is it correct initialization , iget problem in led PWM operation...
give me solution...