On Sun, 2006-04-09 at 14:33 +0200, Jan-Erik Soderholm wrote: > Tim ODriscoll wrote : > > > I'm receiving on portb,0, using a falling edge to cause an > interrupt. > > Does the ISR wait for the full byte to arrive ? Yes. > > ..and the first line of the ISR: > > bcf intcon,INTF ; Clear the INT flag > > Has the full byte been received at this time ? No, this is at the beginning of the ISR > > ..and the last line of the ISR: > > retfie ; Exit the ISR > > Has the full byte been received at *this* time ? Yes. > Maybe there is a edge in the byte itself that casuses > the INTF bit to be reset. Then, when you RETFIE's, > your ISR will just be called again. This is extremely embarrassing; I've just added an extra line to the end of my ISR, just before the retfie - I've cleared the INTF bit again, and now it works exactly as it should. The last two lines of my ISR are now: bcf intcon,INTF retfie It's very odd, because I've never noticed this effect before... Hate the way it's taken me days to work through too.. Oh well, live'n'learn... I'll go see if I can break it again now.. Thanks Jan-Erik.. Tim -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist