2.2.6.1 7-bit Addressing Reception
The following describes a standard sequence of events for the MSSP module configured as an I2C slave in 7-bit Addressing mode. Figure 2-6 and Figure 2-7 are used as a visual reference for this description.
This is a step by step process of what typically must be done to accomplish I2C communication.
- Start condition detected.
- The Start (S) bit is set; SSPxIF is set if the Start Condition Interrupt Enable (SCIE) bit is set.
- Matching address when R/W bit clear is received.
- The slave pulls SDA low, sending an ACK to the master and sets SSPxIF bit.
- Software clears the SSPxIF bit.
- Software reads received address from SSPxBUF, clearing the BF flag.
- If SEN =
1
; Slave software sets the CKP bit to release the SCL line. - The master clocks out a data byte.
- Slave drives SDA low, sending an ACK to the master and setting 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 master.
- Master sends Stop condition, setting the Stop (P) bit, and the bus goes Idle.