--0__=802569EC004D53D58f9e8a93df938690918c802569EC004D53D5 Content-type: text/plain; charset=us-ascii Hi, This may be daft but does the compiler allow you to call functions from interrupts? Generally, I keep things tight in the interrupt (certainly to the point of writing some assembler over C) so no function calls are performed......or, is your function call just an abstraction of what you are actually doing, for the purpose of the example? Dan (Embedded Michael Rigby-Jones @MITVMA.MIT.EDU> image moved 07/02/2001 12:15 to file: pic03902.pcx) Please respond to pic microcontroller discussion list Sent by: pic microcontroller discussion list To: PICLIST@MITVMA.MIT.EDU cc: Subject: Re: [PIC]: Return From Interrupt Security Level:? Internal 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 --0__=802569EC004D53D58f9e8a93df938690918c802569EC004D53D5 Content-type: application/octet-stream; name="pic03902.pcx" Content-Disposition: attachment; filename="pic03902.pcx" Content-transfer-encoding: base64 CgUBCAAAAABBADEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAABQgABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAA= --0__=802569EC004D53D58f9e8a93df938690918c802569EC004D53D5-- -- 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