

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.








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 |
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) |
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
}
No Communication with the EEPROM:
Data Not Written to EEPROM:
Corrupted Data:
Multiple Devices Not Working on the Same Bus:
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.