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.

这程序哪里错了



#include <msp430.h>

/*
* main.c
*/

int main(void)
{
WDTCTL = WDTPW + WDTHOLD; // Stop watchdog timer
P2DIR|=BIT2;

P1DIR &=~BIT6;
P1SEL |=BIT6;
TA1CCTL0=CCIE;
TA1CCR0= 4000;
TA1CTL=TASSEL_0+MC_1+TACLR;
__bis_SR_register(GIE);
}
#pragma vector = TIMER1_A0_VECTOR
__interrupt void TIMER1_A0_ISR(void)
{
P2OUT^=BIT2;
}