29.5.2.1 7-Bit Addressing Reception
This section describes a standard sequence of events for the MSSP module configured as an I2C client in 7-bit Addressing mode. Figure 29-14 and Figure 29-15 are used as a visual reference for this description.
This is a step-by-step process of how to accomplish I2C communication.
- Start bit detected.
- The S bit is set; SSPxIF is set if interrupt on Start detect is enabled.
- Matching address with the R/W bit clear is received.
- The client pulls SDA low sending an ACK to the host, and sets the SSPxIF bit.
- Software clears the SSPxIF bit.
- Software reads the received address from SSPxBUF, clearing the BF flag.
- If SEN =
1
, client software sets the CKP bit to release the SCL line. - The host clocks out a data byte.
- Client drives SDA low sending an ACK to the host, and sets the SSPxIF bit.
- Software clears SSPxIF.
- Software reads the received byte from SSPxBUF, clearing BF.
- Steps 8-12 are repeated for all received bytes from the host.
- Host sends Stop condition, setting the P bit, and the bus goes Idle.