On Thu, 22 May 2008, Alan B. Pearce wrote: >> This "keep sleeping or wake up" should be entirely decided in the ISR. > > It cannot be done like that. Of course it can. > The ISR has to set a flag, and then return from > interrupt, allowing the main program to run around a loop looking at the > flag, to see if anything needs to be done. If nothing is required, then the > main program puts the CPU to sleep. The ISR should never be putting the CPU > to sleep. Why do you believe that? -- John W. Temples, III -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist