#include <msp430g2231.h>
int main( void ){// Stop watchdog timer to prevent time out resetWDTCTL = WDTPW + WDTHOLD;P1DIR |= 0x01;//设置P1.0口为输出P1IE |= 0x08;//使能P1.3中止P1IES |= 0x08;//P1.3口下降沿触发中止P1IFG &= ~0x08;//中止标志位清零_EINT();//开总中止//_BIS_SR(LPM4_bits + GIE);while(1){}}/*中止服务程序*/#pragma vector = PORT1_VECTOR__interrupt void PORT_1(void){P1OUT ^= 0x01;//P1.0状况翻转P1IFG &= ~0x08;//中止标志位清零}