The only problem I see with this method is that if I receive a an edge while I'm in the ISR (for whatever reason, could be for doing other things). I will still get an interrupt once I exit the ISR, but my objective here is to time the pulses, so I'll be getting the interrupt late, and it will throw off my time. If I was a better coder, I could do some sort of error checking. :) Josh -- A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools. -Douglas Adams K|bek Tony wrote: > > Hi, > > Jinx wrote: > >Don't see why not. The data line will be static during the ISR (if it's > >a slow data stream that is) and there won't be any edges to miss. > >Just make sure you exit the ISR before the next edge is due > > I don't see that so crucial ( given that there are enough time to actually > handle the data in time ). As long as the edge detect are setup correctly > for the *next* pulse then the isr flag will be set wether or not you > are inside the isr or not. Ofcource if an edge is detected while inside > the isr the retfie will just 'waste' 4 cycles to vector back to the > beginning of the > isr. Not recommeded, it however should still work a-ok. > The key point is to re-set the hi-lo or lo-hi a.s.a.p. then perform the rest > of > decoding. I think ? > > /tony -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads