Den 2007-09-06 13:57:46 skrev Xiaofan Chen : > Adding the [PIC] tag. OOPS, thanks! > As far as I know, it is always good to keep the interrupt service > routine as lean as possible. And it is generally not a very > good idea to call routines inside ISRs. I agree. When programming in assembler i have kept interrupt routines very small, then let the program enter a postprocessing phase with interrupts re-enabled (And yes i do take care of save/restore in another set) before returning to main. However my collegue who programs this is skilled in C on larger systems and do things another way. I thought it would work that way too, but we was mistaken. As we are in an hurry to make this work so we can show the customer we try to get it work as my programming guy is used to work, it would take much time to relearn both strategy, tools, and rework the system... That said, i am now installint PICC-LITE to begin to learn C myself so i can later try a assembler / C mix approch with efficient interrupt system... -- Morgan Olsson -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist