Hi! I'm having a problem with serial overrun errors, and I can't see how. I'm hoping someone can give me a clue. I'm using HiTech PICC, version 8.02 with a PIC16F877 at 18.43Mhz. I have 3 interrupts that can occur, one is a periodic TMR1 interrupt at 2Khz, one is a TX interrupt (very occasional), and a RX interrupt (say about about 60 chars per second, timed sporaticly), with TX and RX at 115Kbaud (so about 1ms per character). Originally, my (simplified) interrupt code looked like this: interrupt void isr() { if (TMR1IF) { /* fairly long processing, but well under 500us */ } if (TXIF) { /* TXIF code, seems to work */ } while (RCIF) { if (RCSTA & 0x06) /* if OERR or FERR */ { /* error processing */ } else txbuf[txbufptr++] = RCREG; } } However, I was getting overrun errors. No clue as to how. So, I changed my (simplified) interrupt code to: interrupt void isr() { if (TMR1IF) { /* fairly long processing, but well under 500us */ } if (TXIF) { /* TXIF code, seems to work */ } while ((RCIF) || (RCSTA & 0x06)) { if (RCSTA & 0x06) /* if OERR or FERR */ { /* error processing */ } else txbuf[txbufptr++] = RCREG; } } Yet, somehow, I'm still getting overrun errors. I've verified that I'm getting RCIF interrupts indepedent of TMR1IF interrupts. Clues? Thanks! Bill -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body