At 02:33 PM 8/7/02 -0500, Adam Smith wrote: >The reason I need this routine to be short is because I have to retfie >in time for the next interrupt (24 instruction cycles per interrupt, 18 >after you consider the 4 instructions it takes for the PIC to go to the >interrupt vector, etc. and the 2 instructions it takes to retfie). Sorry. I read it as "instructions before the [single instr]" rather than "before the retfie". I think that if you have that close of a time constraint, that this may not be the way you want to do it. (I also know you want to see if you can do it...and I also know that if it works, then, it works :) >(The code that executes in-between interrupts is just an infinite loop. >This is running on a PIC16F872 @ 3.6864 MHz.) Ok, on the chance that the interrupt must be short, but that the time from "timeout" to actually doing that "one instruction" is not so critical, use your "infinite loop" time to offload some of that decrementing or checking. Barry -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.