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.
Hi,
I have attached the code I usually use to setup a PWM output. I don't understand if is possible set P2.4 (TA1.0) as a PWM output, because TA1CCCR0 is used to set the PWM period. Maybe there is a different way to set P2.4, P1.2 and P1.3 as PWM output.
Thanks
Riccardo
//Timer A1 : PWM
TA1CTL = TASSEL__SMCLK |ID__1| MC__UP | TACLR; // SMCLK, up mode, clear TAR
TA1EX0 = TAIDEX_7; // DIV1 : So timer_CLK = SMCLK/1 TA1CCR0 = 2000; // PWM Period 1 kHz TA1CCTL1 = OUTMOD_7; // P1.2 : CCR1 reset/set TA1CCR1 = 0; // P1.2 : CCR1 PWM duty cycle (PWM MOTOR) TA1CCTL2 = OUTMOD_7; // P1.3 : CCR2 reset/set TA1CCR2 = 0; // P1.3 : CCR2 PWM duty cycle (PWM FAN 24V)
**Attention** This is a public forum