void main (void)
{
// Stop watchdog timer to prevent time out reset
WDTCTL = WDTPW + WDTHOLD;
P1DIR |= 0x01; // P1.0 output
TA0CCTL0 = CCIE; // CCR0 interrupt enabled
TA0CCR0 = 20000;
TA0CTL = TASSEL_2 + MC_1 ; // SMCLK, upmode
_EINT();//开总中断
while(1);
}
#pragma vector=TIMER0_A0_VECTOR
__interrupt void Timer0_A5 (void)
{
P1OUT ^= 0x01;
}
总是无法进入中断,求解