29.5.4 Client Mode 10-Bit Address Reception
This section describes a standard sequence of events for the MSSP module configured as an I2C client in 10-bit Addressing mode.
Figure 29-20 is used as a visual reference for this description.
This is a step-by-step process of how the client software can accomplish I2C communication.
- Bus starts Idle.
- The host sends Start condition; the S bit is set; SSPxIF is set if interrupt on Start detect is enabled.
- The host sends matching high address with the R/W bit clear; the UA bit is set.
- The client sends ACK and SSPxIF is set.
- Software clears the SSPxIF bit.
- Software reads the received address from SSPxBUF, clearing the BF flag.
- The client loads low address into SSPxADD, releasing SCL.
- The host sends matching low address byte to the client; the UA
bit is set.Important: Updates to the SSPxADD register are not allowed until after the ACK sequence.
- The client sends ACK and SSPxIF is set.Important: If the low address does not match, SSPxIF and UA are still set so that the client software can set SSPxADD back to the high address. BF is not set because there is no match. CKP is unaffected.
- The client clears SSPxIF.
- The client reads the received matching address from SSPxBUF, clearing BF.
- The client loads high address into SSPxADD.
- The host clocks a data byte to the client and clocks out the client’s ACK on the ninth SCL pulse; SSPxIF is set.
- If the SEN bit is set, CKP is cleared by hardware and the clock is stretched.
- The client clears SSPxIF.
- The client reads the received byte from SSPxBUF, clearing BF.
- If SEN is set, the client sets CKP to release the SCL.
- Steps 13-17 are repeated for each received byte.
- The host sends Stop to end the transmission.