Scusate l'intrusione: ma mi è venuto il dubbio che l'indirizzo della eeprom non sia impostato correttamente, in quanto sul datasheet risulta che dovrebbe essere 1010 0xxx dove xxx dipende da come sono impostati i pin A0, A1, A2.
Nel vostro codice invece indicate:
--- (A2, A1, A0 to GND for 1010000 (0x50) address.)
invece di 0xA0 ... (B10100000)
Riporto qui il testo del datasheet:
The four most significant bits of the 8-bit slave address are fixed as 1010 for the CAT24WC01/02/04/08/16 (see Fig. 5). The next three significant bits (A2, A1, A0) are the device address bits and define which device or which part of the device the Master is accessing.
Che traducendolo sarebbe "l 4 bit più significativi dell'8-bit slave address sono fissati a 1010"...
Poi c'è comunque un dubbio se i 3 bit di indirizzo siano A2, A1, A0 oppure A3, A2, A1 (The next three significant bits) ... ma che nel caso siano tutti a 0 il problema non si pone
