29.2.3.6.3 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-19 shows a standard waveform for a client receiver in 10-bit Addressing mode with clock stretching enabled.
This is a step-by-step process of what must be done by the client software to accomplish I2C communication.
- Bus starts Idle.
- Host sends Start condition; S bit is set; SSPxIF is set if SCIE is set.
- Host sends matching high address with the R/W bit clear; the UA bit is set.
- Client sends ACK and SSPxIF is set.
- Software clears the SSPxIF bit.
- Software reads received address from SSPxBUF, clearing the BF flag.
- Client loads low address into SSPxADD, releasing SCL.
- Host sends matching low address byte to the client; UA bit is
set.Important: Updates to the SSPxADD register are not allowed until after the ACK sequence.
- 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.
- Client clears SSPxIF.
- Client reads the received matching address from SSPxBUF, clearing BF.
- Client loads high address into SSPxADD.
- Host clocks a data byte to the client and clocks out the client 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.
- Client clears SSPxIF.
- Client reads the received byte from SSPxBUF, clearing BF.
- If SEN is set the client software sets CKP to release the SCL.
- Steps 13-17 repeat for each received byte.
- Host sends Stop to end the transmission.