设置了KBI6和KBI7下降沿触发中断,当KBI6发生中断后,并一直保持着低电平,此时KBI7就产生不了中断。如果把KBI6放开则可以进入。我的程序如下:
初始化:
PTAPE = 0xc0;
KBIPE = 0xc0;
KBIES_KBEDG7=0;
KBIES_KBEDG6=0;
KBISC_KBIMOD=0;
KBISC_KBIE = 1; //Enable KBI Interrupts
KBISC_KBACK = 1; // Clear Pending interrupt
interrupt VectorNumber_Vkeyboard void KBI_ISR(void)
{
if (PTAD_PTAD7 == 0)
{
delay(10);
if(PTAD_PTAD7==0)
{
SetAlpha(3,7+48);
}
}
else if(PTAD_PTAD6 == 0)
{
SetAlpha(3,6+48);
}
KBISC_KBACK = 1;
}
请问:要怎样实现KBI6保持低电平的情况下,还能触发KBI7呢。 |