I had significant electrical trouble in getting the EEPROM chip to work, and saw random write failures just like you. Then I had a closer look at the datasheet, and I wired up pin A2 to low, instead of high, assuming it was an address pin. The datasheet is pretty clear on this:
Non-Configurable Chip Select. This pin must be hard wired to logical 1 state (VCC). Device will not operate with this pin left floating or held to logical 0 (VSS).
After doing so, the Eeprom worked just fine.
Yes, I've seen that, but for the 24FC128 that pin IS actually an address pin, so this probably isn't the problem. Could you try writing and reading in chunks of 2 bytes? I just want to make sure that it's not a problem with only this length. Regards, Antal