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) Electrically Erasable Programmable Read-Only Memory (EEPROM) device manufactured by Microchip Technology. It communicates using the I2C (Inter-Integrated Circuit) protocol, making it ideal for applications requiring low pin count and efficient data transfer. The 24LC32 is designed for non-volatile data storage, retaining data even when power is removed. It features low power consumption, making it suitable for battery-powered devices.

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

  • Data logging in embedded systems
  • Configuration and calibration data storage
  • Consumer electronics (e.g., storing user preferences)
  • Industrial control systems
  • Portable devices requiring low-power memory solutions

Technical Specifications

The following table outlines the key technical details of the 24LC32:

Parameter Value
Memory Size 32 Kbits (4K x 8)
Interface I2C (2-wire)
Operating Voltage Range 1.7V 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 Range -40°C to +85°C
Package Options PDIP, SOIC, TSSOP, DFN

Pin Configuration and Descriptions

The 24LC32 is typically available in an 8-pin package. The pinout and descriptions are as follows:

Pin Number Pin Name Description
1 A0 Address input bit 0 (used for device addressing in multi-device configurations)
2 A1 Address input bit 1 (used for device addressing in multi-device configurations)
3 A2 Address input bit 2 (used for device addressing in multi-device configurations)
4 VSS Ground (0V reference)
5 SDA Serial Data (I2C data line)
6 SCL Serial Clock (I2C clock line)
7 WP Write Protect (active high; disables write operations when high)
8 VCC Power supply (1.7V 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.7V 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 the SDA and SCL lines.
  3. Address Configuration: Use the A0, A1, and A2 pins to set the device address. These pins can be tied to VCC or VSS to configure the 3-bit address, allowing up to 8 devices on the same I2C bus.
  4. Write Protection: If write operations are not required, connect the WP pin to VCC to enable write protection. For normal operation, connect it to VSS.

Important Considerations

  • Pull-Up Resistors: Ensure proper pull-up resistors are used on the SDA and SCL lines for reliable I2C communication.
  • Write Cycle Time: Allow sufficient time (5 ms typical) for write operations to complete before initiating another write.
  • Address Conflicts: Avoid address conflicts when using multiple 24LC32 devices on the same I2C bus by configuring unique addresses using the A0, A1, and A2 pins.

Example: Interfacing 24LC32 with Arduino UNO

Below is an example code snippet for reading and writing data to the 24LC32 using an Arduino UNO:

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

#define EEPROM_I2C_ADDRESS 0x50 // Base I2C address of 24LC32 (A0, A1, A2 = 0)

void setup() {
  Wire.begin(); // Initialize I2C communication
  Serial.begin(9600); // Initialize serial communication for debugging
}

void loop() {
  // Write a byte to EEPROM
  writeEEPROM(0x0000, 0x42); // Write 0x42 to memory address 0x0000
  delay(10); // Wait for the write cycle to complete

  // Read the byte back from EEPROM
  byte data = readEEPROM(0x0000);
  Serial.print("Read Data: 0x");
  Serial.println(data, HEX); // Print the read data in hexadecimal format

  while (1); // Stop the loop
}

// Function to write a byte to the 24LC32
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
}

// Function to read a byte from the 24LC32
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 EEPROM
  while (Wire.available() == 0); // Wait for data to become available
  return Wire.read(); // Read and return the received byte
}

Troubleshooting and FAQs

Common Issues

  1. No Communication with the EEPROM:

    • Cause: Incorrect I2C address or wiring.
    • Solution: Verify the I2C address and ensure proper connections for SDA, SCL, and pull-up resistors.
  2. Data Not Written to EEPROM:

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

    • Cause: Insufficient delay after a write operation.
    • Solution: Add a delay of at least 5 ms after each write operation.
  4. Multiple Devices Not Working on the Same Bus:

    • Cause: Address conflict between devices.
    • Solution: Configure unique addresses for each device using the A0, A1, and A2 pins.

FAQs

Q1: Can the 24LC32 operate at 3.3V?
A1: Yes, the 24LC32 operates within a voltage range of 1.7V to 5.5V, making it compatible with 3.3V systems.

Q2: How many devices can I connect to the same I2C bus?
A2: Up to 8 devices can be connected, provided each has a unique address configured using the A0, A1, and A2 pins.

Q3: What happens if I exceed the write endurance limit?
A3: After 1,000,000 write/erase cycles, the memory cells may degrade, leading to unreliable data storage.

Q4: Is the 24LC32 compatible with 5V Arduino boards?
A4: Yes, the 24LC32 is fully compatible with 5V systems, including 5V Arduino boards like the Arduino UNO.