Tool/software: Code Composer Studio
Hi,
I would like to have PWM output on three pins P2.2, P2.3 and P2.4. I have tried following code but it is working for P2.2 only and not for P2.3 and P2.4.
Code:
P2DIR |= BIT2|BIT3|BIT4; // P2.2,P2.3,P2.4 output P2SEL |= BIT2|BIT3|BIT4; TA1CCR0 = 512-1; // PWM Period TA1CCTL1 = OUTMOD_7; // CCR1 reset/set TA1CCR1 = 384; //CCR1 PWM duty cycle TA1CTL = TASSEL_2 + MC_1; // SMCLK, up mode
Please help me to understand mistake in above code. Is it possibe to have same PWM duty cycles on three different pins as mentioned above?
Is it possible to generate different PWM duty cycles on three different pins using single timer?
Thanks,
Krunal