35.10.2 FIFO Reset
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.
Data written to UxTXB when TXEN is low will be held in the Transmit Shift Register (TSR), then sent
when TXEN is set. The transmit buffer and inactive TSR are flushed by setting the TXBE
bit. Setting TXBE while a character is actively transmitting from the TSR will complete
the transmission without being flushed.
Clearing the ON bit will discard all received data and transmit data pending in the TSR and UxTXB.