#include<msp430x54x.h>
void ta0();
void main( )
{
// Stop watchdog timer to prevent time out reset
WDTCTL = WDTPW + WDTHOLD;
ta0();
_BIS_SR(LPM3_bits + GIE);
}
#pragma vector=TIMER0_A1_VECTOR
__interrupt void TimerA()
{
P1OUT ^= BIT4;
}
void ta0()
{
P1DIR |= 0xFF;
P1SEL = BIT1+BIT2+BIT0;
P1OUT &= ~BIT4;
TA0CCTL = CCIE;
TA0CCR1 = 20000;
TA0CTL = TASSEL_1+TAIE;
TA0CTL |= MC_1;
}
哪位大神帮我看看我这为什么进不了中断 |