Very Simple MicroPython Driver For Microchip 47×16 I2C EERAM

Up until a short while ago, I’d never heard of EERAM. When I saw it, I initially thought it was a typo, but after looking into it I was pretty intrigued.

Turns out it’s SRAM and EEPROM packaged in the same device, and you get the benefits of both. During regular operation, you read and write to the SRAM, which means it’s nice and quick and has unlimited write cycles. If power is lost (and you have the right capacitor connected to the Vcap pin), the contents of the SRAM are automatically written to the EEPROM. When power is restored, the contents of EEPROM are automatically read into SRAM.

You can’t use the EEPROM directly, but you can trigger the device to store the SRAM data to the EEPROM with a command or pin, and you can recall the EEPROM data to the SRAM with a command.

It’s kind of strange but neat at the same time. Oh, and it shows up as two devices on the I2C bus! Weird, eh?

I put together a little MicroPython driver that sets the device to auto store in the event of power failure (so you’ll need that capacitor), and added functions to manually store SRAM to EEPROM and recall EEPROM to SRAM. If you’re interested, you can find it at: https://github.com/MarksBench/mb_47x16

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.