24LC512 I2C memory

Discuss development of drivers for external hardware and components, such as LCD screens, sensors, motor drivers, etc.
Target audience: Users and developers of drivers.
User avatar
pythoncoder
Posts: 5373
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: 24LC512 I2C memory

Post by pythoncoder » Tue Dec 17, 2019 7:21 am

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.
Peter Hinch

mikruth
Posts: 19
Joined: Wed Jan 11, 2017 6:00 pm

Re: 24LC512 I2C memory

Post by mikruth » Mon Jan 20, 2020 10:24 am

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)

furia
Posts: 3
Joined: Wed Aug 11, 2021 4:34 pm

Re: 24LC512 I2C memory

Post by furia » Mon Sep 13, 2021 9:43 pm

I know the post is old but is this driver likely to work with eeprom 24lc64?

in the documentation it seems so but I'm not sure.

is there an example that can be reviewed?

Thank you very much for the great work.

User avatar
pythoncoder
Posts: 5373
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: 24LC512 I2C memory

Post by pythoncoder » Tue Sep 14, 2021 5:21 am

The driver will work with Microchip 24xx64 I2C EEPROMS. As stated in the doc, the xx variants cover parameters such as minimum Vcc value and do not affect the API.
Peter Hinch

Post Reply