25.2.3.7.2 7-bit Transmission
A master device can transmit a read request to a slave, and then clock data out of the slave. The list below outlines what software for a slave will need to do to accomplish a standard transmission. Figure 25-23 can be used as a reference to this list.
- Master sends a Start condition.
- The Start (S) bit is set; SSPxIF is set if SCIE is set.
- Matching address with R/W bit set is received by the Slave, setting SSPxIF bit.
- Slave hardware generates an ACK and sets SSPxIF.
- The SSPxIF bit is cleared by software.
- Software reads the received address from SSPxBUF, clearing BF.
- R/W is set so CKP was automatically cleared after the ACK.
- The slave software loads the transmit data into SSPxBUF.
- CKP bit is set by software, releasing SCL, allowing the master to clock the data out of the slave.
- SSPxIF is set after the ACK response from the master is loaded into the ACKSTAT bit.
- SSPxIF bit is cleared.
- The slave software checks the ACKSTAT bit to see if the master
wants to clock out more data.Important:
- If the master 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 master sends a not ACK; the clock is not held, but SSPxIF is still set.
- The master sends a Restart condition or a Stop.