How To Use The AT24C32 EEPROM For 4KB External Memory For Microcontrollers

Electronic Wizard in his lab wearing his wizards hat

Over on YouTube [Electronic Wizard] explains how to use the AT24C32 EEPROM for external memory for microcontrollers.

He begins by explaining that you don’t want to try modifying your microcontroller flash memory for storing settings, you want to use a separate EEPROM for that. Sometimes your microcontroller will have EEPROM memory attached, but you might still find yourself needing to attach more. The AT24C32 EEPROM is a 4KB non-volatile memory chip. It’s available in various 8-pin packages and two voltage levels, either 2.7 to 5.5 volts or 1.8 to 5.5 volts, and it’s programmed using the I2C protocol.

The AT24C32 has three address pins, A{0,1,2}, a Serial Data pin (SDA), a Serial Clock Input (SCL), and a Write Protect pin. He explains how to use the address pins to set the device I2C address and goes into some detail about how the I2C protocol works. Microcontrollers usually have an API for talking to I2C devices, for STM32 controllers that is functions such as HAL_I2C_Master_Transmit(). He refers the viewer to the datasheet for how to accomplish various write and read operations over I2C. The AT24C32 uses 16 bits for addresses of which only 12 are relevant (13 bits are relevant for the 8KB version of the EEPROM the AT24C64).

If you’re interested in EEPROMs you might also like to read Erasing EEPROMs Isn’t Always As Easy As It Seems and How Do You Test If An EEPROM Can Hold Data For 100 Years?

One thought on “How To Use The AT24C32 EEPROM For 4KB External Memory For Microcontrollers

  1. I like to salvage most if not all ICs from old, broken devices that aren’t worth repairing and I’ve gotten a bunch of these I2C EEPROMs over time. They’re quite handy and what’s not to like if you can get them for free, eh?

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

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