Page 2 of 2

Re: 24LC512 I2C memory

Posted: Tue Dec 17, 2019 7:21 am
by pythoncoder
The FM24CL16-G 2KiB chip is not the one on the Adafruit board. That uses the Fujistu MB85RC256V 32KiB device so you would need to modify my driver to suit: the driver makes an explicit check on the chip type.

I can't support every chip, and yours has a tiny capacity - too small for filesystem use.

Re: 24LC512 I2C memory

Posted: Mon Jan 20, 2020 10:24 am
by mikruth
This works for me.

from machine import I2C, Pin
i2c = I2C(scl=Pin(22), sda=Pin(21), freq=400000)
i2c.writeto_mem(80, 0, 'test', addrsize=16)
data = i2c.readfrom_mem(80, 0, 4, addrsize=16)