I2C - DS1307 - 24C02

April 12, 2025

1. No Communication (ACK Not Received)

Q: My device doesn’t respond to addresses.
A:

  • Verify I2C_Init() was called first
  • Check pull-up resistors (4.7kΩ on SDA/SCL)
  • Confirm slave address matches datasheet (7-bit vs 8-bit)
  • Use logic analyzer to check signal integrity

2. Signal Glitches

Q: Random NACKs or corrupted data.
A:

  • Add small delays (_nop_()) between SCL/SDA transitions
  • Ensure power supply is stable (>100mA for bus)
  • Keep I2C traces short (<30cm)

3. Clock Stretching Issues

Q: Master hangs waiting for slave.
A:

  • Implement timeout in I2C_Read():

4. Multi-Master Conflicts

Q: Bus locks up with multiple masters.
A:

  • Add bus arbitration check after I2C_Start():

5. Speed Optimization

Q: How to increase I2C speed?
A:

  • Reduce _nop_() delays (minimum 4.7µs for 100kHz)
  • Use hardware I2C if available
Leave a reply
PCF8591

Leave Your Reply