Datasheet
2−26
• The TXE bit in I2CSTA is cleared, indicating busy.
• The content of the I2CADR register is transmitted to the EEPROM (preceded by start condition on SDA).
• The content of the I2CDAO register is transmitted to the EEPROM (EEPROM address).
• The TXE bit in I2CSTA is set, and interrupts the MCU, indicating that the I2CDAO register has been
transmitted.
• No stop condition is generated.
EEPROM [low byte]
• The MCU writes the low byte of the EEPROM address into the I2CDAO register.
• The TXE bit in I2CSTA is cleared, indicating busy.
• The content of the I2CDAO register is transmitted to the device (EEPROM address).
• The TXE bit in I2CSTA is set, and interrupts the MCU, indicating that the I2CDAO register has been
transmitted.
• This completes the dummy write operation. At this point, the EEPROM address is set and the MCU can
perform a single or a sequential read operation.
2.11.2 Current Address Read Operation
Once the EEPROM address is set, the MCU can read a single byte by executing the following steps:
1. The MCU sets I2CSTA[SRD] = 1, forcing the I
2
C controller to generate a stop condition after the I2CDAI
register is received.
2. The MCU writes the device address (R/W bit = 1) to the I2CADR register (read operation).
3. The MCU writes a dummy byte to the I2CDAO register, starting the transfer on the SDA line.
4. The RXF bit in I2CSTA is cleared.
5. The content of the I2CADR register is transmitted to the device, preceded by a start condition on SDA.
6. Data from the EEPROM is latched into the I2CDAI register (stop condition is transmitted).
7. The RXF bit in I2CSTA is set, and interrupts the MCU, indicating that the data is available.
8. The MCU reads the I2CDAI register. This clears the RXF bit (I2CSTA[RXF] = 0).
2.11.3 Sequential Read Operation
Once the EEPROM address is set, the MCU can execute a sequential read operation by executing the following steps
(Note: this example illustrates a 32-byte sequential read):
1. Device Address
• The MCU sets I2CSTA[SRD] = 0. This prevents the I
2
C controller from generating a stop condition after
the I2CDAI register is received.
• The MCU writes the device address (R/W bit = 1) to the I2CADR register (read operation).
• The MCU writes a dummy byte to the I2CDAO register, starting the transfer on the SDA line.
• The RXF bit in I2CSTA is cleared.
• The content of the I2CADR register is transmitted to the device (preceded by a start condition on SDA).
2. N-Byte Read (31 bytes)
• Data from the device is latched into the I2CDAI register (stop condition is not transmitted).