i2c eeprom.c driver supports 2 address bytes?

Sep 18, 2007 4 Replies

I have a i2c eeprom device (Microchip 24LC65) that has 2 bytes for the device address (this is the 2 bytes that come right after the control byte). The eeprom.c driver seems to handle devices that has only 1 byte for the device address. Has anyone configured the eeprom driver for devices that needs 2 bytes for its addressing?



I am working on a IXP425 board. The i2c algo is i2c-algo-bits.c.



Any help is appreciated!



Which OS?

Gemaakt met Opera's revolutionaire e-mailprogramma: http://www.opera.com/mail/

I am running Snapgear 2.6.x..

The device address (slave address) is just one byte long and is embbedded in the control byte. You are referring to the next two bytes that selects the memory address you are going to read from or write to.

How to select the memory cell:

i2c write "the control byte" with "r/w" flag = 0 i2c write "the high part of the address" i2c write "the low part of the address"

Also check the datasheet.

You can check if my 24LC MTD driver fits your needs. It does support 2 byte addresses.

formatting link

hth, Andrzej Ekiert

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required