22 July 2014

An Arduino Library for External I2C EEPROMs

This is an update of a library I wrote last year for a data logger project. At that time I only needed it to support a couple different EEPROM sizes. Now I've made it more general; it will support EEPROMs between 2k bits and 2M bits (256 bytes to 256k bytes). The library supports multiple EEPROMs on the I2C bus as a single address space (the EEPROMs must be of the same type and their address pins must be appropriately strapped). I/Os can span blocks (for EEPROMs with an internal block structure), pages and devices.

I even wrote some reasonably complete documentation(!) If you try the library and like it, or not, or find issues, please let me know. There is a list of devices that it's been tested with in the ReadMe file; I'd especially like to hear from anyone that tries it with a device not yet listed.

The library can be downloaded from GitHub.


  1. This comment has been removed by the author.

  2. Hi!
    Excelent library !

    I'd like to suggest improvement to add functions for working with string types and structures, for example :
    struct {
    byte var1;
    uint_8 byte var2;
    byte var3;

    char * test;
    String test;

    Best regards!

    1. Hello, glad you like the library. I might use a union to reference the struct as an array of bytes. Another option would be to write a derived class to handle other data types. As for strings, they are often more trouble than they're worth, so I avoid them as a matter of principle.

  3. Tested with M24M01 - working fine. Thanks!

  4. What is eeprom_size_t in M24M01?