Probleme mit EEPROM 24C16

Hallo,
ich benötige Hilfe zum EEPROM 24C16.

Seit einigen Wochen habe ich nun ein Arduino System.
Im zusammenhang mit dem I²C-Bus habe ich mir ein paar EEPROMs bestellt und ausprobiert. Das Speichernn und Auslesen von Daten funktioniert mit einem 24C256 und 24C512 einwandfrei. Verwende ich jedoch ein 24C16 (gleicher Hersteller und gleiche Beschaltung und gleiche Programm) so erhalte ich immer nur den zuletzt geschriebenen Wert (für alle Adressen) aus dem EEPROM Speicher zurück.

Um die Kompatibiltät zu gewährleisten beschreibe und lese ich nur die ersten 20 Adressen im EEPROM. Auch ein verlangsamtes Timing der nach folgenden R/W-Befehle durch delay (10) hat nicht geholfen.

Zur Zeit verwende ich die Entwicklungsumgebung Arduino Alpha 0021.

Hat jemand hierzu weitere Infos ???

Das Problem hatte ich Anfangs auch, allerdings mit dem 24C01.
Ich nehme mal an, Du verwendest die Funktionen aus dem Playground!?
Bei den größeren EEPROMs wird die Speicheradresse als Word übergeben, Du sendest somit zwei Bytes. Die Playground Funktionen sind alle darauf ausgelegt. Der 24C01 bis einschließlich dem 24C16 wird aber über ein einzelnes Byte adressiert. Du musst die Funktionen also etwas anpassen.

Hallo Thee

Ich nehme mal an daß die EEproms von Atmel sind, da andere Firmen andere Pinbelegungen haben, zb Fairchild.
Die EEproms sind nicht ganz Pin-kompatibel.
das 24c16 hat 3 Adress-Pins die 24c128 und 24c256 aber nur 2 (A2 fehlt)

Die Adressierung über den I2C bus ist anders:
zusammenfassend: beim 24c128/256 besteht die I2C Adresse aus 5 konstanten Bits und 2 Adressleitungen, beim 24c16 auns 1 konstanten Bit, 3 Adressbits und der 3-Bit-Nummer des Speicherblocks.

für 24c128/256:
Device Addressing
The 128K/256K EEPROM requires an 8-bit device address word following a start condition to enable the chip for a read or write operation (refer to Figure 1). The device address word consists of a mandatory one, zero sequence for the first five most significant bits as shown. This is common to all 2-wire EEPROM devices.
The 128K/256K uses the two device address bits A1, A0 to allow as many as four devices on the same bus. These bits must compare to their corresponding hardwired input pins.
The A1 and A0 pins use an internal proprietary circuit that biases them to a logic low condition if the pins are allowed to float.
The eighth bit of the device address is the read/write operation select bit. A read operation is initiated if this bit is high and a write operation is initiated if this bit is low.
Upon a compare of the device address, the EEPROM will output a zero. If a compare is not made, the device will return to a standby state.

Figure 1. Device Address: MSB 1 0 1 0 0 A1 A0 R/W LSB

Für das 24c16 gilt:
Device Addressing
The AT24C164 requires an 8-bit device address word following a start condition to enable the chip for read or write operations (refer to Figure 1). The most significant bit must be a one followed by the A2, A1 and A0 device select bits (the A1 bit must be the compliment of the A1 input pin signal).
The next 3 bits are used for memory block addressing and select one of the eight 256 x 8 memory blocks. These bits should be considered the three most significant bits of the data word address. The eighth bit of the device address is the read/write select bit. A read operation is selected if this bit is high or a write operation is selected if this bit is low.
Upon a compare of the device address, the EEPROM will output a zero. If a compare is not made, the chip will return to a standby state.

Figure 1. Device Address MSB 1 A2 A1 A0 B2 B1 B0 R/W LSB

Grüße Uwe