Hi Jan-Erik In my case if I were to strip it out there is no way to check to see if the problem exists. The trouble is not that the ISRs don't read the serial ports and put the correct data in my buffers in either case the basic function of the ISRs works fine. The problem is weird behavior it causes with the rest of my code. What I mean by that is that the program will break out of loops when it should not. I can set a break point as I exit a loop. When I examine the variable that controls the exit from the loop it is not in the range to leave the loop but the code seems to have a mind of its own. So it wanders aimlessly doing everything it can at random. = If I look at the serial port[s] buffers the data are just fine no dropped characters the read and write pointers are right where I expect them i.e. not pointing at strange locations in memory. If I load the one or the other ISR low then it straightens up and everything works as expected. This makes me think that the trouble is with the compiler not handling the entry and exit of the ISRs and corrupting the stack or registers is a good likely suspect. I have the gun to my head to finish this project I on and don't have time to check it out just yet (and I'm not really sure how to do it but I reckon I can start saving/restoring stuff and to see if it might fix my troubles) = Phillip Things should be as simple as possible but no simpler = = = Phillip Coiner CTO, GPS Source, Inc. = = Your source for quality GNSS Networking Solutions and Design Services, Now! -----Original Message----- From: piclist-bounces@mit.edu [mailto:piclist-bounces@mit.edu] On Behalf Of Jan-Erik S=F6derholm Sent: Tuesday, December 05, 2006 10:27 AM To: Microcontroller discussion list - Public. Subject: Re: [PIC] Problems with C18 interrupt code Hi! If possible, strip your application down into the simplest code possible that still shows the same "error". In 9 cases out of 10, the problem is solved at the same time... :-) Jan-Erik. Dumitru Stama skrev: > TR> Dumitru, > TR> Can you generate an asm output (lst file or whatsoever) so that some of us > TR> may could spot something that may not obvious looking at the source code > TR> only and/or a compiler problem? > TR> Tamas > = > Sure, i have the lst file at home. In a few hours i will post it. The > only problem is it has ~40k and just to be sure i will not annoy > anyone i will upload it on a web page and then post the link here. > Thank you for your help > = -- = http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist -- = http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist