25.2.4.3.4 Typical Receive Sequence:

  1. The Master generates a Start condition by setting the SEN bit.
  2. SSPxIF is set by hardware on completion of the Start.
  3. SSPxIF is cleared by software.
  4. Software writes SSPxBUF with the slave address to transmit and the R/W bit set.
  5. Address is shifted out the SDA pin until all eight bits are transmitted. Transmission begins as soon as SSPxBUF is written to.
  6. The MSSP module shifts in the ACK value from the slave device and writes it into the ACKSTAT bit.
  7. The MSSP module generates an interrupt at the end of the ninth clock cycle by setting the SSPxIF bit.
  8. Software sets the RCEN bit and the master clocks in a byte from the slave.
  9. After the eighth falling edge of SCL, SSPxIF and BF are set.
  10. Master clears SSPxIF and reads the received byte from SSPxBUF, which clears BF.
  11. Master clears the ACKDT bit and initiates the ACK sequence by setting the ACKEN bit.
  12. Master’s ACK is clocked out to the slave and SSPxIF is set.
  13. User clears SSPxIF.
  14. Steps 8-13 are repeated for each received byte from the slave.
  15. Master sends a NACK or Stop to end communication.
Figure 25-32. I2C Master Mode Waveform (Reception, 7-bit Address)
Figure 25-33. I2C Master Mode Waveform (Reception, 10-bit Address)