There is an example for a 24LC02 in the Csample.c code.
The device address is a special parameter in the I2C calls, and
should not be included in the message you want to send to the i2c
device.
--- In ARMexpress@yahoogroups.com, "JoeR" <jmrobert5@...> wrote:
>
> Hi,
>
> Anyone connect a 24lc256 eeprom and get it working?
> ref: http://www.sparkfun.com/datasheets/IC/24LC256.pdf
>
> 1. How does one set the start address to write to?
> response = I2COUT(I2C_SDA, I2C_SCL, I2C_CTRLW, i2clen, str);
>
> 2. How does one read data back. The device wants a start cmd
between
> the opt1/opt2 address value and opt3 which I have as the CTRLR
(read)
> byte.
> I2CIN( I2C_SDA, I2C_SCL, I2C_CTRLW, addr>>8, addr, I2C_CTRLR, -1, -
1,
> cnt, read );
>
> So there seems to be a few fundamental issues here.
>
> Thanks,
> Joe
>