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.

f5529 利用中断实现按键相应功能

Other Parts Discussed in Thread: MSP430F5529

想用中断实现:按下按键,LED灯亮

不知下段程序问题在哪儿

#include <msp430f5529.h>
void main(void)
{ WDTCTL=WDTPW+WDTHOLD;
P1SEL&=~BIT7;  //P1.7为按键
P1DIR&=~BIT7;
P1IFG=0X00;
P1IES|=BIT7;
P1IE|=BIT7;
_EINT();
while(1)
{

}
}

#pragma vector=PORT1_VECTOR
__interrupt void PORT1_key(void)
{
P8SEL&=~BIT1;     // P8.1对应LED灯
P8DIR|=BIT1;
P8OUT|=BIT1;
P1IFG=0;
}