Here are some notes from the PIC16F87X datasheet to be aware of:
Quote:
|
If bit OERR is set, transfers from the RSR register to the RCREG register are inhibited, so it is essential to clear error bit OERR if it is set.
|
Also,
Quote:
|
Overrun error bit (OERR bit) has to be cleared in software. This is done by resetting the receive logic (CREN is cleared and then set).
|
If your receiver stops receiving data, you should check bit OERR in the RSR register if the receiver has been overrun and clear the error by resetting the CREN bit and re-enabling it after purging the FIFO.