Page 2 of 2

Drivers for new Adafruit FRAM boards

Posted: Sat Sep 05, 2020 5:46 am
by pythoncoder
There is no limit in the code. The practical limit is the fact that each chip requires a separate CS line. I guess with very large numbers capacitance on the SPI bus might slow things down.

I'm deeply impressed by those FRAM boards which now have capacity to rival EEPROM with effectively zero wearout and 200 year data retention. They are fast, too.

Re: Drivers for EEPROM, FRAM and Flash chips

Posted: Sun Feb 28, 2021 6:21 pm
by sheltyle
I am trying to use this library in a project using pycom boards. Line 71 of 'fram_i2c.py' uses the I2C fucntion 'writevto', which is unavailable for use with the pycom version of micropython:

Code: Select all

self._i2c.writevto(self._i2c_addr, (self._addrbuf, buf[start: start + npage]))
Does anyone know a workaround for this using 'writeto'?

Thanks

Re: Drivers for EEPROM, FRAM and Flash chips

Posted: Sun Feb 28, 2021 11:10 pm
by mcauser
writevto() was recently added for writing a tuple/list of buffers.
Same can be achieved by combining the bufs and calling write() once, or calling write() multiple times within a start() - stop().

Code: Select all

# new way
self._i2c.writevto(self._i2c_addr, (self._addrbuf, buf[start: start + npage]))

# old way, combining bufs, not the most efficient
self._i2c.writeto(self._i2c_addr, self._addrbuf + buf[start: start + npage])

# old manual way, multiple writes
self._i2c.start()
self._i2c.write(bytearray([self._i2c_addr << 1]))  # note: writeto() does this internally for you
self._i2c.write(self._addrbuf)
self._i2c.write(buf[start: start + npage]))
self._i2c.stop()

Re: Drivers for EEPROM, FRAM and Flash chips

Posted: Thu Dec 09, 2021 1:29 am
by Meekdai
Hi everyone,
I have a project that needs to record the number of motor rotations every 1 second to prevent data loss caused by power down. I want to use FRAM to save my motor rotations data. But M85RS2MT or M85RS4MT is too expensive. For me MB85RC16 (16 K (2 K × 8) Bit I2C) or MB85RS64A (64 K (8 K × 8) Bit SPI) is enough.

The drivers https://github.com/peterhinch/micropython_eeprom only support FRAM (M85RS2MT and M85RS4MT). Is it possible to let it support small-capacity FRAM for data reading and writing?

Thanks.

Re: Drivers for EEPROM, FRAM and Flash chips

Posted: Thu Dec 09, 2021 9:42 am
by pythoncoder
FRAMs are very simple devices to drive. Unfortunately I can't develop a driver for hardware I don't possess so I'm afraid you'll have to adapt the driver yourself. If you do this and have success by all means issue a PR.

Re: Drivers for EEPROM, FRAM and Flash chips

Posted: Sun Dec 04, 2022 4:14 pm
by JeffT
This is really neat, I just got to playing with the 2 Mbit Adafruit spi fram breakout and an ESP32 dev kit and had a FRAM file system in no time, ty for posting