MSP430定時器中斷程序,編譯了沒反應,哪里有問題呢?(我程序都有注釋,麻煩看看)
- void main(void){ WDTCTL = WDTPW + WDTHOLD; // Stop watchdog timer 停止看門狗 TA0CTL |= TAIE; //Timer_A interrupt enable TA0CCR0=320; //時鐘設置為0.1秒 TA0CTL |= 0x0008; //MC 為Up mode TA0CTL |= 0x0100; //時鐘源為輔助時鐘SMCLK TA0CTL |= 0x0001; //Interrupt pending while (1) { }}////TA0CCR0 CCIFG TA0IV TA0CCR0 GIE TA0CTL// TAIE TA0CCR0 MC TACCR1//*****************************************//*定時器中斷程序#pragma vector=TIMER1_A0_VECTOR__interrupt void TIMER_A (void){ P1OUT ^= 0x01; // Toggle P1.0 (LED) delay(100); // delay 延時}
-
問
提問者:網友
2017-10-22