Hi, Can anybody give me a small code which can demonstrate to me the way to write interrupt functions. I have tried but it din't worked.The code is below -
#include<AT89x52.h> #include<stdio.h> void int0(void) interrupt 1 { P2^=0x01; } void main() { EA=1; while(1) { } }
"Can anybody give me a small code which can demonstrate to me the way to write interrupt functions." The very first item on the C51 downloads page is, "8051 /INT0 External Interrupt Example Program" I know it's a bit obscure, but you should just be able to make out a subtle hint in the title there... ;-) http://www.keil.com/download/list/c51.htm