This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

求解程序问题



以下程序现象是当下进程序后并没按键其灯也点亮了,也就是说一开始就进入了中断,求解原因,万分感谢
#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;
}
//本程序现象是下进程序后,没有按键四个灯也点亮了。