The following section describes the sequence of events that occur when the module is receiving data in 10-bit addressing mode:
0), the address buffers, I2CxADB0 and I2CxADB1, are enabled. In this case, the address high
byte and R/W bit are loaded into I2CxADB1, with
R/W clear (R/W =
0). The address low byte is loaded into I2CxADB0 and the Restart Enable (RSEN) bit is set by software. After
these registers are loaded, software must set the Start (S) bit to begin communication. Once
the S bit is set, master hardware waits
for the Bus Free (BFRE) bit to be set before
transmitting the Start condition to avoid bus collisions.1), the address buffers are disabled. In this case, the
number of expected received bytes are loaded into I2CxCNT, the address high byte and
R/W bit are loaded into I2CxTXB, with R/W clear
(R/W = 0). A write to I2CxTXB
will cause master hardware to automatically issue a Start condition once the
bus is idle (BFRE = 1). Software
writes to the Start bit are ignored.If an ACK was received, module hardware transmits the address low byte.
0: Master
generates a Stop condition, or sets the MDR bit (if RSEN is also set) and waits for
software to set the Start bit to generate a Restart condition.1:
Master generates a Stop condition, or sets the MDR bit (if RSEN is also set)
and waits for software to load a new address into I2CxTXB. Software writes to the Start bit are
ignored.If the NACK Detect Interrupt Enable (NACKIE) is also set, hardware sets the generic I2CxEIF bit.
0),
software sets the Start bit. If ABD is set (ABD = 1), software
writes the address high byte with R/W bit into I2CxTXB, with R/W set
(R/W = 1).If an ACK is received, master hardware receives the first seven bits of the data byte into the receive shift register.
If a NACK is received, and:
0: Master
generates a Stop condition, or sets the MDR bit (if RSEN is also set) and waits for
software to set the Start bit to generate a Restart condition.1:
Master generates a Stop condition, or sets the MDR bit (if RSEN is also set)
and waits for software to load a new address into I2CxTXB. Software writes to the Start bit are
ignored.1) when the first seven
bits are received by the receive shift register, hardware sets MDR, and the clock is stretched after the 7th
falling edge of SCL. This allows software to read I2CxRXB, which clears the RXBF
bit, and prevents a receive buffer overflow. Once the RXBF bit is cleared, hardware releases SCL. 0),
hardware transmits the value of the Acknowledge Data (ACKDT) bit as the acknowledgement response
to the slave. It is up to user software to properly configure ACKDT. In most
cases, ACKDT should be clear (ACKDT = 0), which indicates an
ACK response.0), hardware transmits the value of the Acknowledge
End of Count (ACKCNT) bit as the acknowledgement
response to the slave. CNTIF is set, and master hardware either
issues a Stop condition or a Restart condition. It is up to user software to
properly configure ACKCNT. In most cases, ACKCNT should be set (ACKCNT =
1), which indicates a NACK response. When hardware detects
a NACK on the bus, it automatically issues a Stop condition. If a NACK is not
detected, the Stop will not be generated, which may lead to a stalled bus
condition.