Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Component Documentation

How to Use 24LC32: Examples, Pinouts, and Specs

Image of 24LC32
Cirkit Designer LogoDesign with 24LC32 in Cirkit Designer

Introduction

The 24LC32 is a 32Kbit (4K x 8) I2C EEPROM (Electrically Erasable Programmable Read-Only Memory) designed for non-volatile data storage. It operates on a supply voltage range of 1.8V to 5.5V and communicates via a 2-wire I2C interface. This component is ideal for applications requiring reliable data retention without power, such as configuration storage, calibration data, or small-scale data logging.

Explore Projects Built with 24LC32

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
STM32 Nucleo F303RE Controlled Ultrasonic Sensing with RGB Feedback and I2C LCD Display
Image of CS435-final: A project utilizing 24LC32 in a practical application
This circuit features a STM32 Nucleo F303RE microcontroller interfaced with three HC-SR04 ultrasonic sensors for distance measurement and a 20x4 LCD display over I2C for data output. Additionally, there is a WS2812 RGB LED strip controlled by the microcontroller for visual feedback. The power supply provides a common 5V to the LCD, ultrasonic sensors, LED strip, and the microcontroller's +5V input, with all components sharing a common ground.
Cirkit Designer LogoOpen Project in Cirkit Designer
ESP32-Controlled Dual 8x8 LED Matrix Display with NTP Time Synchronization
Image of time: A project utilizing 24LC32 in a practical application
This circuit features an ESP32 microcontroller connected to two cascaded 8x8 LED matrix displays, powered by a 3.3V battery. The ESP32 drives the displays to show time and other information, with the code indicating functionality for connecting to WiFi, synchronizing time via NTP, and displaying data on the matrices using custom fonts. Additionally, there is a separate 3.3V battery powering a red LED, which appears to function as a simple indicator light.
Cirkit Designer LogoOpen Project in Cirkit Designer
ESP32-Based Health Monitoring System with TFT Display and RTC
Image of RemindeRx Circuit Design: A project utilizing 24LC32 in a practical application
This circuit features an ESP32 microcontroller interfaced with an ILI9341 TFT display, a DS3231 RTC module, and a MAX30102 sensor for health monitoring. The ESP32 handles display updates and sensor data acquisition, while the ULN2003 driver controls a 28BYJ-48 stepper motor. The setup is designed for a health monitoring system with a graphical user interface.
Cirkit Designer LogoOpen Project in Cirkit Designer
ESP32-Controlled Smart Home Automation System with I2C LCD Feedback
Image of Home automation: A project utilizing 24LC32 in a practical application
This circuit features an ESP32 microcontroller connected to a 4-channel relay module and a 20x4 LCD display with I2C interface. The ESP32 controls the relay channels to switch external devices and uses the LCD to display the status of each relay channel. The code includes Blynk IoT platform integration for remote control and monitoring, and the display provides a user interface for local status updates.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with 24LC32

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Image of CS435-final: A project utilizing 24LC32 in a practical application
STM32 Nucleo F303RE Controlled Ultrasonic Sensing with RGB Feedback and I2C LCD Display
This circuit features a STM32 Nucleo F303RE microcontroller interfaced with three HC-SR04 ultrasonic sensors for distance measurement and a 20x4 LCD display over I2C for data output. Additionally, there is a WS2812 RGB LED strip controlled by the microcontroller for visual feedback. The power supply provides a common 5V to the LCD, ultrasonic sensors, LED strip, and the microcontroller's +5V input, with all components sharing a common ground.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of time: A project utilizing 24LC32 in a practical application
ESP32-Controlled Dual 8x8 LED Matrix Display with NTP Time Synchronization
This circuit features an ESP32 microcontroller connected to two cascaded 8x8 LED matrix displays, powered by a 3.3V battery. The ESP32 drives the displays to show time and other information, with the code indicating functionality for connecting to WiFi, synchronizing time via NTP, and displaying data on the matrices using custom fonts. Additionally, there is a separate 3.3V battery powering a red LED, which appears to function as a simple indicator light.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of RemindeRx Circuit Design: A project utilizing 24LC32 in a practical application
ESP32-Based Health Monitoring System with TFT Display and RTC
This circuit features an ESP32 microcontroller interfaced with an ILI9341 TFT display, a DS3231 RTC module, and a MAX30102 sensor for health monitoring. The ESP32 handles display updates and sensor data acquisition, while the ULN2003 driver controls a 28BYJ-48 stepper motor. The setup is designed for a health monitoring system with a graphical user interface.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of Home automation: A project utilizing 24LC32 in a practical application
ESP32-Controlled Smart Home Automation System with I2C LCD Feedback
This circuit features an ESP32 microcontroller connected to a 4-channel relay module and a 20x4 LCD display with I2C interface. The ESP32 controls the relay channels to switch external devices and uses the LCD to display the status of each relay channel. The code includes Blynk IoT platform integration for remote control and monitoring, and the display provides a user interface for local status updates.
Cirkit Designer LogoOpen Project in Cirkit Designer

Common Applications:

  • Embedded systems requiring non-volatile memory
  • Data logging in IoT devices
  • Storing configuration or calibration data
  • Consumer electronics and industrial automation

Technical Specifications

Key Specifications:

Parameter Value
Memory Size 32Kbit (4K x 8)
Interface I2C (2-wire)
Operating Voltage Range 1.8V to 5.5V
Maximum Clock Frequency 400 kHz (Standard Mode)
Write Cycle Time 5 ms (typical)
Data Retention > 200 years
Endurance 1,000,000 write/erase cycles
Operating Temperature -40°C to +85°C

Pin Configuration:

The 24LC32 is typically available in an 8-pin package (e.g., PDIP, SOIC). Below is the pinout description:

Pin Number Pin Name Description
1 A0 Address input bit 0 (used for I2C addressing)
2 A1 Address input bit 1 (used for I2C addressing)
3 A2 Address input bit 2 (used for I2C addressing)
4 VSS Ground (0V reference)
5 SDA Serial Data (I2C data line, open-drain)
6 SCL Serial Clock (I2C clock line)
7 WP Write Protect (active HIGH; disables write operations when HIGH)
8 VCC Power supply (1.8V to 5.5V)

Usage Instructions

How to Use the 24LC32 in a Circuit:

  1. Power Supply: Connect the VCC pin to a power source (1.8V to 5.5V) and the VSS pin to ground.
  2. I2C Connections:
    • Connect the SDA pin to the I2C data line of the microcontroller.
    • Connect the SCL pin to the I2C clock line of the microcontroller.
    • Use pull-up resistors (typically 4.7kΩ) on both SDA and SCL lines.
  3. Address Configuration:
    • Use the A0, A1, and A2 pins to set the I2C address. These pins can be tied to VCC or VSS to configure the address.
    • The base address of the 24LC32 is 0x50, and the full address is determined by the state of A0, A1, and A2.
  4. Write Protection:
    • If write protection is required, set the WP pin HIGH. For normal operation, connect WP to ground.

Example: Connecting 24LC32 to an Arduino UNO

Below is an example of how to connect and use the 24LC32 with an Arduino UNO:

Circuit Diagram:

  • Connect:
    • VCC to Arduino 5V
    • VSS to Arduino GND
    • SDA to Arduino A4
    • SCL to Arduino A5
    • WP to GND (disable write protection)

Arduino Code Example:

#include <Wire.h> // Include the Wire library for I2C communication

#define EEPROM_I2C_ADDRESS 0x50 // Base I2C address of 24LC32

void setup() {
  Wire.begin(); // Initialize I2C communication
  Serial.begin(9600); // Initialize serial communication for debugging
  writeEEPROM(0x0000, 42); // Write the value 42 to memory address 0x0000
  int value = readEEPROM(0x0000); // Read the value from memory address 0x0000
  Serial.print("Read value: ");
  Serial.println(value); // Print the read value
}

void loop() {
  // Main loop does nothing
}

// Function to write a byte to the EEPROM
void writeEEPROM(unsigned int address, byte data) {
  Wire.beginTransmission(EEPROM_I2C_ADDRESS);
  Wire.write((address >> 8) & 0xFF); // Send the high byte of the address
  Wire.write(address & 0xFF);        // Send the low byte of the address
  Wire.write(data);                  // Send the data byte
  Wire.endTransmission();
  delay(5); // Wait for the write cycle to complete (typical 5ms)
}

// Function to read a byte from the EEPROM
byte readEEPROM(unsigned int address) {
  Wire.beginTransmission(EEPROM_I2C_ADDRESS);
  Wire.write((address >> 8) & 0xFF); // Send the high byte of the address
  Wire.write(address & 0xFF);        // Send the low byte of the address
  Wire.endTransmission();
  Wire.requestFrom(EEPROM_I2C_ADDRESS, 1); // Request 1 byte from the EEPROM
  if (Wire.available()) {
    return Wire.read(); // Return the received byte
  }
  return 0xFF; // Return 0xFF if no data is available
}

Important Considerations:

  • Pull-Up Resistors: Ensure proper pull-up resistors are used on the SDA and SCL lines.
  • Write Cycle Time: Allow sufficient time (5ms) for write operations to complete.
  • Address Conflicts: Avoid I2C address conflicts when using multiple devices on the same bus.

Troubleshooting and FAQs

Common Issues:

  1. EEPROM Not Responding on I2C Bus:

    • Cause: Incorrect I2C address or wiring.
    • Solution: Verify the A0, A1, and A2 pin configurations and ensure proper connections.
  2. Data Not Written to EEPROM:

    • Cause: Write protection enabled (WP pin HIGH).
    • Solution: Ensure the WP pin is connected to ground for write operations.
  3. Corrupted Data:

    • Cause: Insufficient delay after write operations.
    • Solution: Add a delay of at least 5ms after each write operation.
  4. No Data Read from EEPROM:

    • Cause: Incorrect memory address or I2C communication issue.
    • Solution: Double-check the memory address and ensure proper pull-up resistors are in place.

FAQs:

  • Q: Can I use the 24LC32 with a 3.3V microcontroller?

    • A: Yes, the 24LC32 operates within a voltage range of 1.8V to 5.5V, making it compatible with 3.3V systems.
  • Q: How many devices can I connect on the same I2C bus?

    • A: Up to 8 24LC32 devices can be connected by configuring the A0, A1, and A2 pins for unique addresses.
  • Q: What happens if I exceed the write endurance limit?

    • A: After 1,000,000 write/erase cycles, the memory cells may degrade, leading to unreliable data storage.
  • Q: Is the 24LC32 suitable for high-speed applications?

    • A: The 24LC32 supports a maximum clock frequency of 400 kHz, which is sufficient for most standard-speed applications.