Other Parts Discussed in Thread: MSP430G2452
I wrote this piece of code to generate a 25% PWM. But the problem is that it generates the output only when pin is set to BIT2.
Can anyone tell me the reason the problem with the piece of code that I am using.
#include <msp430g2452.h>
void main(void)
{
WDTCTL = WDTPW +WDTHOLD;
P1SEL |= BIT2; // problem arises when i set it to BIT3
P1DIR |= BIT2; // problem arises when i set it to BIT3
CCR0 = 1024;
CCTL1 = OUTMOD_7;
CCR1 = 256;
TACTL = TASSEL_2 + MC_1;
_BIS_SR(LPM0_bits);
}