EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

i2c eeprom.c driver supports 2 address bytes?

Started by Unknown September 17, 2007
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!

Op Tue, 18 Sep 2007 04:21:33 +0200 schreef <dchou4u@hotmail.com>:
> 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.
Which OS? -- Gemaakt met Opera's revolutionaire e-mailprogramma: http://www.opera.com/mail/
On Sep 18, 7:18 am, "Boudewijn Dijkstra" <boudew...@indes.com> wrote:
> Op Tue, 18 Sep 2007 04:21:33 +0200 schreef <dcho...@hotmail.com>: > > > 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. > > Which OS? > > -- > Gemaakt met Opera's revolutionaire e-mailprogramma: http://www.opera.com/mail/
I am running Snapgear 2.6.x..
<dchou4u@hotmail.com> wrote in message
news:1190082093.158372.5900@d55g2000hsg.googlegroups.com...
> 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.
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.
dchou4u@hotmail.com wrote:
> 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?
You can check if my 24LC MTD driver fits your needs. It does support 2 byte addresses. http://andrzejekiert.ovh.org/software.html.en hth, Andrzej Ekiert

The 2024 Embedded Online Conference