I recently wrote a library to support a 25LC512 chip I bought and decided to go further and make it general-purpose enough to support the whole line of 25LC/25AA chips.
**Note: I have not physically tested any chips besides the 25LC512, in a near-future parts order I may buy a few of them to try them out.
Library is called SPIEEP
Documentation is here: https://bitbucket.org/spirilis/spieep/wiki/Home
Bitbucket repository: https://bitbucket.org/spirilis/spieep/src
Zip file of current version: http://spirilis.net/stuff/arduino/SPIEEP.zip
Supports almost all features on the chips, including Deep Power Down mode and Chip, Page Erase for those chips that support it (25LC512 and 25LC1024, for the most part)
Does not manage the Write Protection or implement Segment Erase opcode
Supports writing/reading arbitrary lengths of data to/from the EEPROM in an efficient manner even if it spans page boundaries, and supports a companion set of functions that write/read other data types like int, long, float and double with addresses adjusted to reflect the multiple-byte nature of these datatypes.
Also includes "_offset" functions that allow you to read/write int, long, float, double with the address adjusted by a byte-level "origin" so you can, for instance, store an array of doubles (and reference them from 0 to 100, for example) but begin storing them at address 0x1FFE, rather than 0x0000 or whatever. Useful for partitioning an EEPROM chip into multiple arrays of different datatypes.
Includes a "test_chip()" method which destructively overwrites/reads the last byte on the chip; helpful to determine if your chip is functioning properly. This goes a step further on the 25LC512/25LC1024 to work out the Deep Power Down mode, verifying that reads aren't successful during deep-sleep.
Includes support for the 25LC040's quirky addressing, where it uses an 8-bit address but stuffs the 9th address bit inside the instruction opcode.
Main gripe I can admit is that I went overboard writing everything and the whole library feels a bit bloated for something intended for embedded computing
But it works fine on my ATmega8.