How to Use the AT24C32 EEPROM for 4KB External Memory for Microcontrollers

Wait 5 sec.

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?