2.3 Receive Buffer

The stand-alone I2C module has a dedicated receive buffer, I2CxRXB, which operates independently from the transmit buffer.

The receive buffer holds one byte of data that is shifted in from the receive shift register. User software or the DMA can read the byte through the I2CxRXB register. When a new byte is received, the Receive Buffer Full Status (RXBF) bit is set. The RXBF bit replaces the Buffer Full (BF) bit used in the MSSP module upon reception of a full byte. Reading I2CxRXB will clear the RXBF bit. If the buffer is read while empty (RXBF = 0), the Receive Read Error Status (RXRE) bit is set, and the module generates a NACK. User software must clear the RXRE bit to resume normal operation. Additionally, setting the Clear Buffer (CLRBF) bit clears both the receive and transmit buffers, as well as the I2C Receive Interrupt Flag (I2CxRXIF) bit and I2C Transmit Interrupt Flag (I2CxTXIF) bit.