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

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

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

Introduction

The 24LC64, manufactured by Microchip Technology, is a 64Kbit (8K x 8) EEPROM (Electrically Erasable Programmable Read-Only Memory) that communicates via the I2C (Inter-Integrated Circuit) interface. This non-volatile memory component is designed to retain data even when power is removed, making it ideal for applications requiring persistent data storage.

Explore Projects Built with 24LC64

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Arduino-Controlled 4-Channel RF Decoder Data Display with I2C LCD Interface
Image of FYP: A project utilizing 24LC64 in a practical application
This circuit comprises an Arduino UNO microcontroller interfaced with four 2-to-12 series CMOS decoders, a 433 MHz RF receiver module, four 1MΩ resistors, four red LEDs, and a 20x4 I2C LCD display. The Arduino reads 3-bit data from each decoder, which are likely receiving signals from the RF receiver, and displays the binary data on the LCD. The LEDs are connected to the decoders' VT (valid transmission) pins, indicating successful data reception, and the entire circuit is powered by a 5V DC source.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino Mega 2560-Based Smart Home Control System with LCD Display and Flame Sensor
Image of Copy of schoolproject (1): A project utilizing 24LC64 in a practical application
This circuit is a multi-functional embedded system featuring an Arduino Mega 2560 microcontroller that interfaces with a 4x4 membrane keypad, a 20x4 I2C LCD, an 8x8 LED matrix, a DS3231 RTC module, a passive buzzer, and a KY-026 flame sensor. The system is powered by a 5V PSU and is designed to provide real-time clock functionality, user input via the keypad, visual output on the LCD and LED matrix, and flame detection with an audible alert.
Cirkit Designer LogoOpen Project in Cirkit Designer
Solar-Powered STM32-Based Automation System with Matrix Keypad and RTC
Image of soloar cleaner : A project utilizing 24LC64 in a practical application
This circuit features an STM32F103C8T6 microcontroller interfaced with a membrane matrix keypad for input, an RTC DS3231 for real-time clock functionality, and a 16x2 I2C LCD for display. It controls four 12V geared motors through two MD20 CYTRON motor drivers, with the motor power supplied by a 12V battery regulated by a buck converter. The battery is charged via a solar panel connected through a solar charge controller, ensuring a renewable energy source for the system.
Cirkit Designer LogoOpen Project in Cirkit Designer
Cellular-Enabled IoT Device with Real-Time Clock and Power Management
Image of LRCM PHASE 2 BASIC: A project utilizing 24LC64 in a practical application
This circuit features a LilyGo-SIM7000G module for cellular communication and GPS functionality, interfaced with an RTC DS3231 for real-time clock capabilities. It includes voltage sensing through two voltage sensor modules, and uses an 8-channel opto-coupler for isolating different parts of the circuit. Power management is handled by a buck converter connected to a DC power source and batteries, with a fuse for protection and a rocker switch for on/off control. Additionally, there's an LED for indication purposes.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with 24LC64

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 FYP: A project utilizing 24LC64 in a practical application
Arduino-Controlled 4-Channel RF Decoder Data Display with I2C LCD Interface
This circuit comprises an Arduino UNO microcontroller interfaced with four 2-to-12 series CMOS decoders, a 433 MHz RF receiver module, four 1MΩ resistors, four red LEDs, and a 20x4 I2C LCD display. The Arduino reads 3-bit data from each decoder, which are likely receiving signals from the RF receiver, and displays the binary data on the LCD. The LEDs are connected to the decoders' VT (valid transmission) pins, indicating successful data reception, and the entire circuit is powered by a 5V DC source.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of Copy of schoolproject (1): A project utilizing 24LC64 in a practical application
Arduino Mega 2560-Based Smart Home Control System with LCD Display and Flame Sensor
This circuit is a multi-functional embedded system featuring an Arduino Mega 2560 microcontroller that interfaces with a 4x4 membrane keypad, a 20x4 I2C LCD, an 8x8 LED matrix, a DS3231 RTC module, a passive buzzer, and a KY-026 flame sensor. The system is powered by a 5V PSU and is designed to provide real-time clock functionality, user input via the keypad, visual output on the LCD and LED matrix, and flame detection with an audible alert.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of soloar cleaner : A project utilizing 24LC64 in a practical application
Solar-Powered STM32-Based Automation System with Matrix Keypad and RTC
This circuit features an STM32F103C8T6 microcontroller interfaced with a membrane matrix keypad for input, an RTC DS3231 for real-time clock functionality, and a 16x2 I2C LCD for display. It controls four 12V geared motors through two MD20 CYTRON motor drivers, with the motor power supplied by a 12V battery regulated by a buck converter. The battery is charged via a solar panel connected through a solar charge controller, ensuring a renewable energy source for the system.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of LRCM PHASE 2 BASIC: A project utilizing 24LC64 in a practical application
Cellular-Enabled IoT Device with Real-Time Clock and Power Management
This circuit features a LilyGo-SIM7000G module for cellular communication and GPS functionality, interfaced with an RTC DS3231 for real-time clock capabilities. It includes voltage sensing through two voltage sensor modules, and uses an 8-channel opto-coupler for isolating different parts of the circuit. Power management is handled by a buck converter connected to a DC power source and batteries, with a fuse for protection and a rocker switch for on/off control. Additionally, there's an LED for indication purposes.
Cirkit Designer LogoOpen Project in Cirkit Designer

Common Applications and Use Cases

  • Configuration data storage for embedded systems
  • Calibration data storage in industrial equipment
  • Logging sensor data in IoT devices
  • Storing user preferences in consumer electronics
  • Firmware or small data storage in microcontroller-based systems

Technical Specifications

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

Parameter Value
Memory Size 64 Kbits (8K x 8 bytes)
Interface I2C (2-wire)
Operating Voltage Range 2.5V to 5.5V
Maximum Clock Frequency 400 kHz (Fast Mode I2C)
Write Cycle Time 5 ms (typical)
Data Retention > 200 years
Endurance 1,000,000 write/erase cycles
Operating Temperature -40°C to +85°C
Package Options PDIP, SOIC, TSSOP, MSOP

Pin Configuration and Descriptions

The 24LC64 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 I2C slave address selection)
2 A1 Address input bit 1 (used for I2C slave address selection)
3 A2 Address input bit 2 (used for I2C slave address selection)
4 VSS Ground (0V reference)
5 SDA Serial Data (I2C bidirectional data line)
6 SCL Serial Clock (I2C clock line)
7 WP Write Protect (logic HIGH disables write operations, logic LOW enables writes)
8 VCC Power supply (2.5V to 5.5V)

Usage Instructions

How to Use the 24LC64 in a Circuit

  1. Power Supply: Connect the VCC pin to a power source (2.5V 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 Selection:
    • Use the A0, A1, and A2 pins to set the I2C slave address. These pins can be tied to either VCC (logic HIGH) or VSS (logic LOW).
    • The base address of the 24LC64 is 0x50. The final address is determined by the states of A0, A1, and A2.
  4. Write Protect:
    • If write protection is required, connect the WP pin to VCC. To enable write operations, connect it to VSS.

Example: Interfacing 24LC64 with Arduino UNO

Below is an example of how to interface the 24LC64 with an Arduino UNO to write and read data.

Circuit Diagram

  • Connect the 24LC64 pins as follows:
    • VCC to Arduino 5V
    • VSS to Arduino GND
    • SDA to Arduino A4
    • SCL to Arduino A5
    • WP to GND (to enable write operations)
    • Use 4.7kΩ pull-up resistors on SDA and SCL lines.

Arduino Code

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

#define EEPROM_I2C_ADDRESS 0x50 // Base I2C address of the 24LC64

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

  // Write a byte to EEPROM
  writeEEPROM(0x0000, 42); // Write the value 42 to memory address 0x0000
  delay(10); // Wait for the write cycle to complete

  // Read the byte back from EEPROM
  uint8_t value = readEEPROM(0x0000);
  Serial.print("Read value: ");
  Serial.println(value); // Print the read value
}

void loop() {
  // Nothing to do here
}

// Function to write a byte to the 24LC64
void writeEEPROM(uint16_t address, uint8_t 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();            // End the I2C transmission
}

// Function to read a byte from the 24LC64
uint8_t readEEPROM(uint16_t 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();            // End the I2C transmission

  Wire.requestFrom(EEPROM_I2C_ADDRESS, 1); // Request 1 byte from the EEPROM
  if (Wire.available()) {
    return Wire.read(); // Read and return the byte
  }
  return 0; // Return 0 if no data is available
}

Important Considerations and Best Practices

  • 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 (typically 5ms) for write operations to complete before attempting to read or write again.
  • Address Conflicts: Avoid I2C address conflicts when using multiple devices on the same bus.
  • Write Protect: Use the WP pin to prevent accidental overwrites in critical applications.

Troubleshooting and FAQs

Common Issues

  1. No Communication with the EEPROM:

    • Check the I2C connections and ensure pull-up resistors are properly connected.
    • Verify the I2C address matches the configuration of the A0, A1, and A2 pins.
  2. Incorrect Data Read/Write:

    • Ensure the write cycle time (5ms) is respected before reading or writing again.
    • Verify the memory address being accessed is within the valid range (0x0000 to 0x1FFF).
  3. Write Operations Failing:

    • Check the state of the WP pin. If it is HIGH, write operations are disabled.

FAQs

Q: Can I use the 24LC64 with a 3.3V microcontroller?
A: Yes, the 24LC64 operates within a voltage range of 2.5V 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 24LC64 devices can be connected on the same I2C bus by configuring the A0, A1, and A2 pins to set unique addresses.

Q: What happens if power is lost during a write operation?
A: The data being written may be corrupted. It is recommended to implement power-failure detection mechanisms in critical applications.