NVRAM of DS3231 real time clock

There is NO Atmel EEPROM that will respond to all 8 addresses at the same time. It's bad

I'm not following. The three lower bits place the device in the I2C address space, right?

Once that is fixed the device can have different amounts of RAM.

According to this link
https://www.microchip.com/en-us/product/AT24C02C

the 02 has 256x8 bits of data, or 256BYTEs. NOT what AZDelivery say.

Even if it was a real genuine AT24C02 it would only respond to ONE address being 0x57
Your I2C scan is showing that it is responding to all addresses from 0x50 to 0x57

Yes, and there is no hypothetical external circuit configuration that could do it (hence no possible board fault). If there is, I'd like to hear the explanation...

However, given that there are a few EEPROM variants on the market, it would make sense to attempt to configure the code for an '02, and see if it works. (hint, hint, hint...)

If it's a smaller memory than what it is sold as, it is still false advertising. But if the chip works, it's not necessarily a fake.

Up to the OP what he wants to do

Sure, until everyone loses patience. Also it is not only the OP that will read this thread. Other people might have, or acquire the same board, and wish to use whatever EEPROM it has.

I checked mine and found an AT24C32.

If the OP only wants justice and their money back, more power to them. However some people might prefer to understand and work around the limitation.

In fact, in some of my experiences, I've been given a refund and allowed to keep the part, which I fixed and used. Double kill. :slight_smile:

The photograph of the board is an open and closed proof of non-compliance with the advertising copy, so the vendor has no defence. That is so, whether or not the chip is genuine.

Also, I have found, when challenging a vendor, it pays to have as complete information about the problem as possible. They will always try, "have you tried this, have you tried that...".

1 Like

Yes, I don't need all that memory, just about 16 bytes. But I've already asked AZDelivery why their info is wrong. Let's see what they say.

I've also asked them why my test code does not work.

But, I don't understand what you mean by...

... Is the 02 at a different address, i.e. not 0x57? I mean if I only use a few bytes at the start of the memory won't a 256 byte and a 1024 byte memory work equally well?

Look back in the thread, the library has to be configured for a 2k part vs. a 32k part. Unless I've missed something... see post #46

Is the 02 at a different address, i.e. not 0x57?

No.

I just found this:

https://www.makerfabs.com/ds3231-precision-rtc-at24c32-eeprom-module.html

with links do demo code which I have downloaded.

When I have time I'll have a looksee, when I have time I'll report back if AZDelivery replies back to me.

I don't think any special libraries or code is required. Just configuring the library for the correct part...

I wouldn't expect any real help from AZDelivery. They probably don't have much idea about it. They will be focused on closing the issue in any way possible, including a refund if it's easier for them.

1 Like

Unrelated to the eeprom, note that the picture you posted has the DS3231M. The M suffix indicates the use of a "microelectromechanical systems (MEMS) resonator" instead of a crystal, which only gives +-5ppm accuracy, and the SQW output can only produce a 1Hz signal.

1 Like

And the photo in their manual show an N suffix, on the amazon page the details have been edited out, but the EEPROM shown is a 32:

Totally not to be trusted.

Tested with the other library, same results, writes "ABCD....Z". Reads "?????????....?"

Let me try to clarify what I'm suggesting.

There is in fact at least one Atmel EEPROM that would respond to all eight addresses, and that's the AT24C16. On that chip, the pins which are assigned to A0-A2 on the C32 are "NC" on the C16. And if you read the datasheet, you will see that it will respond to any address in the form 0b1010xxx. See Section 6.1 of the datasheet:

https://ww1.microchip.com/downloads/en/DeviceDoc/20005858A.pdf

But his chip marking says 24C02, which would normally not be a C16. But if the manufacturer (certainly not Atmel, but whoever) decided to mark its chips in terms of kilobytes instead of kilobits, then the C02 marking could be appropriate for a C16 since both would be 16Kbits = 2Kbytes.

So I'm suggesting that the OP find a library for the C16, and see if that works for him. I see this one on Github, but don't know anything about it:

https://github.com/manzarehassin/AT24C16

If it really is a C16 marked "C02", that's still only half the size promised by AZ_Delivery.

The plot thickens... :slight_smile:

I had made extensive use of an RTC's EEPROM with Python. What I noted was that to read the EEPROM was that a write command is sent first. The EEPROM quickly wore down.

The OP might consider using FRAM that has quite a bit more read write cycles then the NVRAM on the RTC modules.

1 Like

Mmmm. Probably that was only a write to an internal address register, which is volatile. If it wore down it was for a different reason. Or the Python code was incorrect.

The 32 will also respond to all 8 address if the address pins are left floating BUT they are all pulled high. So whether it's a 32 16 or 02 it should only respond to 0x57.
The person in the other post tried shorting all the address jumpers, same result.

No. On the 16, those three pins on the chip are NC. It's different from the others. The pullups or pulldowns on the module would have no effect because they aren't connected to anything on the chip.

And the reason the C32 library won't work is because the format of the address byte is different from that of the C32. You need a library that specifically understands the C16.

Well of course I'm just guessing here, but the C16 appears to be the one chip that would legitimately respond to all eight addresses.

1 Like

@ShermanP is correct, only the 16 will respond to all 8 addresses

1 Like