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.
24LC512 I2C memory
- pythoncoder
- Posts: 4940
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact:
Re: 24LC512 I2C memory
Peter Hinch
Re: 24LC512 I2C memory
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)
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)