SOLVED: I2C RTC and EEPROM module not responding

Thread Starter

AlbertHall

Joined Jun 4, 2014
12,345
I have a circuit on a breadboard. It has an I2C LCD and HMC5883L magnetometer.
I added a 24C64 EEPROM and got that working.
Then I realised that the project could use a RTC so I got a DS3231 RTC module which also has a 24C32 EEPROM (which is big enough.
The problem is that neither of these two respond on the I2C.

I2C Addresses:
LCD 0X4E/0x4F
HMC5883L 0x3C/0x3D

Expected addresses:
DS3231 0xD0/0xD1
24C32 0xA0/0xA1

I wrote an I2C scan routine - sends the address and checks for an ACK. This routine got an ACK from addresses:
0x3C, 0x3D which matches the HMC5883L
0x4E, 0x4F which matches the LCD

Other addresses whick responded:
0X3E, 0x50, 0x51, 0x53, 0x53 but I don't know what these are.

Note: no response from 0xD0, 0xD1, 0xA0, 0x A1 which should be the RTC module addresses.
I have tried two similar RTC modules with the same results.

Any ideas what is going on here?
 

ericgibbs

Joined Jan 29, 2010
18,766
hi A,
The 0x50, 0x51, 0x53, 0x53 but I don't know what these are.
They match the addresses below , with the High Nibble set to '5'
E

#include "DS3231.h"

#define REG_SEC 0x00
#define REG_MIN 0x01
#define REG_HOUR 0x02
#define REG_DOW 0x03
#define REG_DATE 0x04
#define REG_MON 0x05
#define REG_YEAR 0x06
#define REG_CON 0x0e
#define REG_STATUS 0x0f
#define REG_AGING 0x10
#define REG_TEMPM 0x11
#define REG_TEMPL 0x12
 

Thread Starter

AlbertHall

Joined Jun 4, 2014
12,345
hi A,
The 0x50, 0x51, 0x53, 0x53 but I don't know what these are.
They match the addresses below , with the High Nibble set to '5'
E

#include "DS3231.h"

#define REG_SEC 0x00
#define REG_MIN 0x01
#define REG_HOUR 0x02
#define REG_DOW 0x03
#define REG_DATE 0x04
#define REG_MON 0x05
#define REG_YEAR 0x06
#define REG_CON 0x0e
#define REG_STATUS 0x0f
#define REG_AGING 0x10
#define REG_TEMPM 0x11
#define REG_TEMPL 0x12
But if that was it, why no response from 0x54 to 0x5F?
 

ericgibbs

Joined Jan 29, 2010
18,766
hi,
I have used the DS3231 with PIC's and Arduino.
If you have an Arduino on the bench you could write a RTC test program, just to check out the DS3231's

Which MCU are you using.?
E
 

Thread Starter

AlbertHall

Joined Jun 4, 2014
12,345
hi,
I have used the DS3231 with PIC's and Arduino.
If you have an Arduino on the bench you could write a RTC test program, just to check out the DS3231's

Which MCU are you using.?
E
That's an idea I can try. I am using a PIC24 and my bit bang I2C.
 

Thread Starter

AlbertHall

Joined Jun 4, 2014
12,345
The board is found by the arduino I2C scanner.
The eeprom address is not 0xA0 but is actually 0xAE - the A0, A1, and A2 bits default to '1' for this EEPROM.

Both RTC and EEPROM communicate with the arduino sketches.
So, back to the PIC.
 

Thread Starter

AlbertHall

Joined Jun 4, 2014
12,345
SOLVED!
Apart from the EEPROM address problem, I don't know what the problem was.
I removed all the I2C wires and reconnected them in a daisy chain manner. Originally they were a star arrangement. Maybe they didn't like the star or something was misconnected.
 
Top