In message <199703210007.SAA21738@dfw-ix9.ix.netcom.com> PICLIST@MITVMA.MIT.EDU writes: > Mike: > > Is it possible that, rather than ignoring 3 edges while you're in > your interrupt service routine, you're actually ignoring FOUR? If > you're still in the interrupt routine when the edge you want comes > through, clearing the TMR1IF flag will keep it from being processed. > > I don't know how you're ignoring those three edges, but if you're > actually counting those edges in the ISR, you should clear the TMR1IF > flag IMMEDIATELY after seeing the third ignored edge. That way, if > the fourth edge comes through before you exit the ISR, it'll generate > an interrupt as soon as your RETFIE is executed. > > Did that make sense? If not, let me know and I'll rephrase it... I'm > pretty tired right now. > Andy, That made perfect sense - thanks. I am counting the edges in the ISR. The edges are about 100us apart. The next group is some 5ms later. I have a port pin set when I enter the ISR and clear when I leave, and I have left the ISR before the 1st edge of the second group. Regards, Mike Watson