Skip to content

Write error across page boundary with AT24C512 #3

@dksmall

Description

@dksmall

I have a Mega2560 connected to the AT24C512 using the I2C interface. Pullups (2.1K) are on SDL and SDA.

I'm using Put to store a 17-byte structure to EEPROM memory, starting at address 1. The first 3 records are fine, but the 4th record which should go to byte 68, stops writing at byte 63. This is with a page size of 64. Changing the page size to 128 will work until it hits byte 127, then stops writing. If I write a single byte to any of these locations, that works as expected. The only change to settings was going from 64 to 128 for the page size.

Code snippets:
struct eRecordType {
float Vout1;
float Vout2;
float Vout3;
float Vout4;
byte ValidRec;
};

eRecordType eRecord; //variables used
ExternalEEPROM ExtMem;

ExtMem.put(addr,eRecord); //where addr = 52 for page=64 or 120 for page=128

Attached are memory dumps where the same data is written until the page boundary is hit.
memory dumps.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions