I suggest you should enable your interrupts AFTER the Flash_the)led() function. Are you sure that you aren't overflowing the stack with the combined calls in your main loop and the ISR calls? Mike > -----Original Message----- > From: Nuri ERGINER [SMTP:nerginer@SSM.GOV.TR] > Sent: Wednesday, February 07, 2001 6:58 AM > To: PICLIST@MITVMA.MIT.EDU > Subject: [PIC]: Return From Interrupt > > Hi, > > I am using hi-tech C to program my pic16f84a. I write a code with > interrupts. > But there is a problem. When an interrupt occurs the code perfectly go to > the inturrupt procedure. When it finish executing the inturrupt procedure > it begins to execute the main block starting from the begining. Here is a > demo code: > > > main() > { > GIE=1; > INTE=1; > Flash_the_led(); > > while(1){ > Do_other_stuff(); > } > } > > static void interrupt isr(void){ > if (INTF) { > inturrupt_stuff(); > INTF=0; > } > } > > after executing isr() the code went to Flas_the_led() procedure but It > must > execute the Do_other_stuff(); > I need your help > > Regards, > Nuri Erginer > > -- > http://www.piclist.com hint: The list server can filter out subtopics > (like ads or off topics) for you. See http://www.piclist.com/#topics > > -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics