This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

About interrupt , can't run into the interrupt which number id is bigger than five!

the keil can detect the interrupt ,but can't run into the interrupt function !
thank you !

//my program ! use DS89C420 MICRO CHIP!

#include "reg420.h"
unsigned int count;
void ini_INT12(void);
main()
{
ini_INT12();

while(1);

}

void ini_INT12(void)
{
EX2 =1 ;
EA = 1;
}


void INT12(void) interrupt 12 using 2
{
P3 = 0; //can't run to here !
}

thank you !

Parents
  • I am not familiar with your particular device, but I think you are confusing the interrupt enable bits with the interrupt flags. You also seem to be confusing external interrupts 2 and 3.

    I still think you are specifying the wrong interrupt number for your interrupt service routine.

    I suggest you look at the Keil manuals and the datasheet for your device.

    Stefan

Reply
  • I am not familiar with your particular device, but I think you are confusing the interrupt enable bits with the interrupt flags. You also seem to be confusing external interrupts 2 and 3.

    I still think you are specifying the wrong interrupt number for your interrupt service routine.

    I suggest you look at the Keil manuals and the datasheet for your device.

    Stefan

Children