#include
void main(void)
{
WDTCTL = WDTPW + WDTHOLD; // 禁止看门狗
P1DIR |= 0x01; // P1.0 输出
TACTL = TASSEL_2 + MC_2 + TAIE; // SMCLK, 计数模式中断
_BIS_SR(LPM0_bits + GIE); // 进入 LPM0 w/ 中断
}
// Timer_A3 Interrupt Vector (TAIV) handler
#pragma vector=TIMERA1_VECTOR
__interrupt void Timer_A(void)
{
switch( TAIV )//Timer A Interrupt Vector Word 检查定时器A的中断矢量字
{
case 2: break; // CCR1 not used
case 4: break; // CCR2 not used
case 10: P1OUT ^= 0x01; // 溢出的时候
break;
}
}