No vectored ints on that one? On Thu, Jul 11, 2013 at 1:43 PM, Neil wrote: > And there it is... the big Doh!!!! > > You're right -- RC1IF is set when a char comes in, and one of my other > timers calls the interrupt for other reasons. I guess I could move > the serial-receive interrupt to after all the other interrupts are > checked, or better, change my interrupt to get the enable bit like > this instead... > > void high_isr (void) > { > if ((PIR1bits.RC1IF) && (PIEbits.RC1IE)) > { > ... > > > See, I knew it had to be me! :) > > Thanks, > -Neil. > > > > > Quoting Nicola Perotto : > > > Hi Neil, > > > > On 11/07/2013 17:28, Neil wrote: > >> Been banging my head over a problem with the EUSART missing chars > >> coming into a PIC18F24K22. > >> > >> Quick overview -- I am sitting in a busy loop waiting for chars with > >> RC1IF, and processing anything that comes in right away. I do have a > >> serial-receive interrupt routine that gets used later, but it's > >> disabled for now (PIE1bits.RC1IE =3D 0). > > I think that you miss a point: if the routine is still compiled in > > the interrupt > > handler it exists and works. > > That you have disabled is ONLY the firing of a NEW interrupt when > receiving a > > char. But if you are in the interrupt by other means maybe that the > serial > > routine will be invoked. > > This because the RC1IF and TX1IF flags are set too if the interrupt > > is not enabled. > > Cheers > > Nicola > > > > -- > > http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive > > View/change your membership options at > > http://mailman.mit.edu/mailman/listinfo/piclist > > > > > -- > http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist > --=20 http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .