#include "msp430x14x.h" int main( void ) { WDTCTL = WDTPW + WDTHOLD; P1IE |=0x01; //下降沿触发 P1IES |=0x01; P1IE |=0x02; P1IES |=0x02; P1IFG &=~0x03; P2DIR=0xff; _BIS_SR(GIE); //while(1); } #pragma vector=PORT1_VECTOR __interrupt void PORT1a (void) { P2OUT = 0xf0; P1IFG=0x00; } //本程序现象是下进程序后,没有按键四个灯也点亮了。