> One of my clients has a problem with the context saves taking too long in > his interrupt routine. He has moved the ISR to the end of the file and > wants advice on how to pare it down further. He has a very complex system > that is doing real time control but the 80 cycles to get into his interrupt > is very problematic. When we decided on C instead of ASSY we did not > consider this and I need to know if we are working into a situation without > a solution. 80 cycles is rediculous! I just looked at my standard interrupt template and it will take 22 cycles to get into and out of a full featured interrupt (FSR and PCLATH saved/restored). That doesn't include doing any real interrupt work but does take into account that STATUS is unknown when jumping to the interrupt exit code. 80 cycles is just waaaaay out of line. It shows once again that on small resource limited systems compilers are for high level tasks or low level programmers. The obvious answer is to write the interrupt routine in assembler, duh! Anyone writing code for tiny systems like PICs should know the instruction set and be able to write assembler, even if using a compiler for the majority of the project. If you're scared of assembler go write GUI apps in visual basic and forget you ever heard about PICs, or practice saying "Do you want fries with that?". If you want to see how it's done in assembler, check out my template interrupt module at http://www.embedinc.com/pic. ***************************************************************** Embed Inc, embedded system specialists in Littleton Massachusetts (978) 742-9014, http://www.embedinc.com -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads