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.

CCS/MSP430G2553: why my little code doesn't work(timer modules)

Part Number: MSP430G2553

Tool/software: Code Composer Studio

Hi ,Iwant to when  TA0CCR0=40000  LED  in BIT2  ON  and when TAR=65535  LED OFF.
But the led stays off when I run the program.where is the problem




#include <msp430.h> int main(void) { WDTCTL = WDTPW | WDTHOLD; // Stop watchdog timer P1DIR |= BIT2; //set output mode pin P1SEL |= BIT2; TA0CTL |= MC_2 + TASSEL_2 ; // contunue mode-smclk TA0CCTL0|=OUTMOD_3; // outmod Set/Reset TA0CCR0 =40000; while(1) { } }


**Attention** This is a public forum