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 !
Are you sure that the correct interrupt number is 12? Stefan
to Stefan : yes i can make sure ! because the keil set the interrupt flag EX3 to 1 . dear stefan ! you help me a lot . thank you ! i am a freshman about keil c!
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
thank you all way ! I am not confusing external interrupts 2 and 3 and not confusing interrupts enable and interrupts flags ! I type the EX2 for wrong! good days! i think you are an expert about keil c!