DS3231 and FRAM memory I2C intererence

On my board I have among others the above components (FRAM is a 85RC256V module with 32KB).
The memory has an I2C address from 0x50 to 0x57, while the DS has 0x68 for the RTC and again from 0x50 to 0x57 for the onboard RAM.
When I run a R/W test for the FRAM without the RTC installed everything is fine, but when I insert the RTC too I get wrong results from the FRAM, as if something is interfering.

The odd happens running the I2Cscanner; it returns this:

Scanning...
I2C device found at address 0x03  //AS3935 module
I2C device found at address 0x50 //FRAM module AND RTC RAM module
I2C device found at address 0x51 //RTC RAM  module
I2C device found at address 0x52 //RTC RAM  module
I2C device found at address 0x53 //RTC RAM  module
I2C device found at address 0x54 //RTC RAM  module
I2C device found at address 0x55 //RTC RAM  module
I2C device found at address 0x56 //RTC RAM  module
I2C device found at address 0x57 //RTC RAM  module
I2C device found at address 0x68 //RTC
I2C device found at address 0x76 //BME280 module
I2C device found at address 0x7C // unknown address ??
done

Even changing the DS ram address, just to test, from the default 0x57 to 0x56 does not change and this is clear since the 0x57 or 0x56 address should never be used.
So seems that the problem comes from the 0x50 RTC address that is the same of the FRAM.
This last can be changed too, but the overlap will still be present anyway.

I wonder why the I2Cscanner 'sees' all the RTC addresses and how to hide then if possible.
Note: I tried 3 different RTC modules just to be sure none was defective.

that's weird that you see the RTC EEPROM at every address between 0x50 and 0x57

may be pull-ups on your I2C bus are necessary?

It is very weird and I can not find any explanation.
This happens even if I only mount the RTC leaving apart all the other modules: the scanners sees all the addresses.

Since I'm usin a Lolin Wemos Mini D1, which does not have any resistors on the I2C pins (according to the schematic) I added two 7.5K resistors; I think they should be enough for a 3.3V VCC, right?

I usually go for 4.7kΩ may be 7.5kΩ is too weak

does your RTC work well at 3.3V ? may be you need an I2C voltage adaptor

The DS3231 module from AZ-delivery is rated for a Vcc between 3.3 and 5V. It works perfectly at 3.3V. I will possibly try to decresase the pull-ups.

ok. decreasing the resistor value makes for a stronger pullup

did you play at all with the address setting pads?


may be check they are properly grounded or solder them to fix the address?

That particular module has on board eeprom located at 0x50

isn't that what you set by using A0 A1 and A2 ? (0x50 to 0x57)
0x68 is fixed for the RTC

1 Like

Yes but:

If A0,A1,A2 are actually pulled-up then the default address would be 0x57
If for some reason they are floating, then it will respond to any/all address between 0x50 and 0x57.

I suspect there may be missing/wrong pull-ups, bad traces bad solder joints on the PCB

Nothing to do with your issue, but it never hurts to say

if your RTCs are like the one in the picture, you may want to do a field modification and fix the charging circuit by removing it.

a7

Which Arduino board do you use ? I wonder how all the 5V and 3.3V I2C devices are connected to the I2C bus.
Can you give links to everything that is connected to the I2C bus ?

Do you use a rechargeable battery or a normal battery for the RTC ?
Using a normal battery and removing the charging circuit as alto777 wrote is the best. Or you can buy good things instead of crappy things. Good DS3231: https://www.adafruit.com/product/3028

Do you have small cutting pliers ? Just cut the EEPROM from the board.

The only thing I know for certain is that if it is responding to all address between 0x50 and 0x57, then either A0,A1,A2 are all floating or it's not an AT24C32 EEPROM

That’s why I was suggesting indeed to test those pads - seems a natural suspect

Sorry @J-M-L missed that you are right

You may want to use suspenders, but there is already a belt, viz:

The A2, A1, and A0 pins use an internal proprietary circuit that biases them to a logic low condition if the pins are allowed to float.

I kinda remembered that from reading the data sheet some time ago, never mind precisely how long.

a7

True but the datasheet also states:
The A2, A1 and A0 pins are device address
inputs that are hard wired or left not connected for hardware compatibility with
AT24C16.
Then read the AT24C16 datasheet

OK, that part doesn't have address pins. They are labeled NC which means don't use them.

I've missed any point you were trying to make.

a7

Well, this is going to be a Sherlock Holmes case...
I soldered all the pads to ground, so I should get ONLY a 0x50 address, according to a note I found on WEB:

By default, all three address inputs are pulled HIGH using onboard pullups,

In any case, I should read 0x50 or 0x57.

I tried three different values for the I2C pull-up: 4.7K, 7.5K and 10K. Pls consider that using just the RTC section (no memory), the module works ok even without any resistor.

For @ jim-p: the onboard eeprom chip is a 24C02 (see the image if I can include here).
For @ alto777: the recharging diode was already cut off.

If I do not find a real solution, my only alternative is to do what @ Koepel suggest: cut off the eeprom (which I do not use anyway), but this is the last chanche.


It has ALL addresses between 0x50 and 0x57

If it's a real 24C02 then ignore all my posts