I'm trying to enable PWM of P2.0 of my MSP430 LaunchPad and have not been able to do so yet. The Chip I'm using is the msp430g2553. The code works fine with P1.6, but I have not been successful on getting the same PWM settings to output on P2.0.
Any help will be appreciate.
WDTCTL = WDTPW + WDTHOLD; // Stop watchdog timer
BCSCTL1 = CALBC1_8MHZ; //Set DCO Range, ACLK DIV/1, XTS Low-frequency mode.
DCOCTL = CALDCO_8MHZ; //Set DCO Step and Modulation
BCSCTL3 |= LFXT1S_0 + XCAP_3; //LFXT1 = 32768-Hz crystal on LFXT1, ~12.5 pF
BCSCTL2 |= SELM_0 + DIVM_0 + DIVS_3; //MCLK = DCO, SMCLK = MCLK/8
P1DIR |= BIT6;
P2DIR |= BIT0;
P1SEL |= BIT6;
P2SEL |= BIT0;
TA0CCR0 = 5000;
TA1CCR0 = 5000;
TA0CCR1 = 500;
TA1CCR1 = 500;
TA0CCTL1 = OUTMOD_7;
TA1CCTL1 = OUTMOD_7;
TA1CTL = TASSEL_2 + MC_1 + ID_2;
TA0CTL = TASSEL_2 + MC_1 + ID_2;
_BIS_SR(LPM0_bits); // Enter Low power mode 0