All modes support resetting the receive and transmit buffers.
The receive buffer is flushed and all unread data discarded when the RXBE bit is written to ‘1’. Instead of using a
BSF
instruction to set RXBE, the MOVWF
instruction
with the TXBE bit cleared will be used to avoid inadvertently clearing a
byte pending in the TSR when UxTXB is empty.
Clearing the ON bit will discard all received data and transmit data pending in the TSR and UxTXB.