2.2.7.4 10-bit Transmission
The list below outlines the steps for 10-bit transmission in Slave mode:
- Master issues a Start condition.
- The Start (S) bit is set, SSPxIF is set; if SSPxIE is set, jump to ISR.
- Software clears SSPxIF.
- Slave receives upper address byte of 10-bit address with R/W bit clear, hardware sets BF and UA, and clears D/A. Hardware stretches the clock.
- Slave hardware compares the received address byte with the address loaded into SSPxADD.
- Slave transmits ACK sequence. If address does not match, slave transmits a NACK sequence.
- Slave hardware sets SSPxIF.
- Slave software reads SSPxBUF, hardware clears BF.
- Software clears SSPxIF.
- Software loads the lower 10-bit address into SSPxADD, clearing UA and releasing SCL.
- Slave receives lower address byte, sets BF and UA.
- Hardware compares the received address byte to the address loaded into SSPxADD.
- Slave transmits ACK sequence, sets SSPxIF.
- Software reads SSPxBUF, hardware clears BF.
- Software clears SSPxIF.
- Software loads SSPxADD with the high byte of the 10-bit address, hardware clears UA.
- Master issues a Restart condition and transmits high byte of 10-bit address with R/W set.
- Slave receives the high byte of the 10-bit address with the R/W bit set, hardware sets BF and R/W.
- Hardware compares the received address byte to the address loaded into SSPxADD.
- Software reads SSPxBUF, clearing BF.
- Hardware issues an ACK sequence, sets SSPxIF.
- After the 9th falling SCL edge, hardware clears CKP (clock stretch), allowing software to load SSPxBUF with data to transmit, setting BF.
- Software sets CKP, releasing the clock.
- Slave transmits full byte, hardware clears BF and sets D/A.
- Slave receives ACK from master, hardware clears ACKSTAT and sets SSPxIF.
- Software clears SSPxIF.
- Slave repeats steps 22 - 26 until all bytes have been transmitted.
- Slave receives Stop condition, setting the P bit.