29.5.3.2 7-Bit Transmission
A host device can transmit a read request to a client, and then clock data out of the client. The list below outlines what software for a client will need to do to accomplish a standard transmission. Figure 29-18 can be used as a reference to this list.
- The host sends a Start condition on SDA and SCL.
- The S bit is set; SSPxIF is set if interrupt on Start detect is enabled.
- Matching address with the R/W bit set is received by the Client, setting the SSPxIF bit.
- Client hardware generates an ACK and sets SSPxIF.
- The SSPxIF bit is cleared by user.
- Software reads the received address from SSPxBUF, clearing BF.
- R/W is set, so CKP was automatically cleared after the ACK.
- The client software loads the transmit data into SSPxBUF.
- The CKP bit is set releasing SCL, allowing the host to clock the data out of the client.
- SSPxIF is set after the ACK response from the host is loaded into the ACKSTAT register.
- SSPxIF bit is cleared.
- The client software checks the ACKSTAT bit to
see if the host wants to clock out more data.Important:
- If the host ACKs, then the clock will be stretched.
- ACKSTAT is the only bit updated on the rising edge of the ninth SCL clock instead of the falling edge.
- Steps 9-13 are repeated for each transmitted byte.
- If the host sends a not ACK, the clock is not held, but SSPxIF is still set.
- The host sends a Restart condition or a Stop.
- The client is no longer addressed.