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

How to Use 25LC128: Examples, Pinouts, and Specs

Image of 25LC128
Cirkit Designer LogoDesign with 25LC128 in Cirkit Designer

Introduction

The 25LC128 is a 128 Kbit (16 K x 8) serial EEPROM manufactured by Microchip Technology. It is designed for non-volatile data storage, meaning it retains data even when power is removed. The component communicates using the SPI (Serial Peripheral Interface) protocol, making it suitable for a wide range of applications requiring reliable and compact memory solutions.

Explore Projects Built with 25LC128

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
ESP32 and Logic Level Converter-Based Wi-Fi Controlled Interface
Image of Toshiba AC ESP32 devkit v1: A project utilizing 25LC128 in a practical application
This circuit features an ESP32 Devkit V1 microcontroller connected to a Bi-Directional Logic Level Converter, which facilitates voltage level shifting between the ESP32 and external components. The ESP32 is powered through its VIN pin via an alligator clip cable, and the logic level converter is connected to various pins on the ESP32 to manage different voltage levels for communication.
Cirkit Designer LogoOpen Project in Cirkit Designer
ESP32-Based NFC Attendance System with LCD Feedback
Image of rfid scanner: A project utilizing 25LC128 in a practical application
This circuit features an ESP32 microcontroller that interfaces with an LCD screen and an NFC/RFID reader, likely for the purpose of tracking and displaying student attendance or count. The LCD is used to show the number of students detected by the NFC/RFID reader, with a fixed count displayed on the second line. A buzzer is also connected to the ESP32, which could be used for audible notifications, and a push switch is included to control the power to the ESP32. Power regulation is managed by a Mini 360 Buck Converter connected to a DC power source.
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 25LC128 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
Configurable Battery-Powered RF Signal Transmitter with DIP Switch Settings
Image of fyp transmitter: A project utilizing 25LC128 in a practical application
This circuit appears to be a configurable encoder system with an RF transmission capability. The encoder's address pins (A0-A7) are connected to a DIP switch for setting the address, and its data output (DO) is connected to an RF transmitter, allowing the encoded signal to be wirelessly transmitted. The circuit is powered by a 9V battery, regulated to 5V by a 7805 voltage regulator, and includes a diode for polarity protection. Tactile switches are connected to the encoder's data inputs (D1-D3), and an LED with a current-limiting resistor indicates power or activity.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with 25LC128

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 Toshiba AC ESP32 devkit v1: A project utilizing 25LC128 in a practical application
ESP32 and Logic Level Converter-Based Wi-Fi Controlled Interface
This circuit features an ESP32 Devkit V1 microcontroller connected to a Bi-Directional Logic Level Converter, which facilitates voltage level shifting between the ESP32 and external components. The ESP32 is powered through its VIN pin via an alligator clip cable, and the logic level converter is connected to various pins on the ESP32 to manage different voltage levels for communication.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of rfid scanner: A project utilizing 25LC128 in a practical application
ESP32-Based NFC Attendance System with LCD Feedback
This circuit features an ESP32 microcontroller that interfaces with an LCD screen and an NFC/RFID reader, likely for the purpose of tracking and displaying student attendance or count. The LCD is used to show the number of students detected by the NFC/RFID reader, with a fixed count displayed on the second line. A buzzer is also connected to the ESP32, which could be used for audible notifications, and a push switch is included to control the power to the ESP32. Power regulation is managed by a Mini 360 Buck Converter connected to a DC power source.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of LRCM PHASE 2 BASIC: A project utilizing 25LC128 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
Image of fyp transmitter: A project utilizing 25LC128 in a practical application
Configurable Battery-Powered RF Signal Transmitter with DIP Switch Settings
This circuit appears to be a configurable encoder system with an RF transmission capability. The encoder's address pins (A0-A7) are connected to a DIP switch for setting the address, and its data output (DO) is connected to an RF transmitter, allowing the encoded signal to be wirelessly transmitted. The circuit is powered by a 9V battery, regulated to 5V by a 7805 voltage regulator, and includes a diode for polarity protection. Tactile switches are connected to the encoder's data inputs (D1-D3), and an LED with a current-limiting resistor indicates power or activity.
Cirkit Designer LogoOpen Project in Cirkit Designer

Common Applications and Use Cases

  • Data logging in embedded systems
  • Configuration and calibration data storage
  • Firmware storage for microcontrollers
  • Industrial automation systems
  • Consumer electronics requiring non-volatile memory

Technical Specifications

The following table outlines the key technical details of the 25LC128:

Parameter Value
Memory Size 128 Kbit (16 K x 8)
Interface Protocol SPI (Serial Peripheral Interface)
Operating Voltage Range 2.5V to 5.5V
Maximum Clock Frequency 10 MHz (at 4.5V to 5.5V)
Write Cycle Time 5 ms (typical)
Endurance 1,000,000 write cycles (typical)
Data Retention 200 years (typical)
Operating Temperature Range -40°C to +85°C
Package Types PDIP, SOIC, TSSOP, MSOP

Pin Configuration and Descriptions

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

Pin Name Description
1 CS Chip Select: Activates the device when pulled low.
2 SO Serial Data Output: Outputs data to the SPI master.
3 WP Write Protect: Disables write operations when pulled low.
4 VSS Ground: Connect to system ground.
5 SI Serial Data Input: Receives data from the SPI master.
6 SCK Serial Clock: Clock signal for SPI communication.
7 HOLD Hold: Pauses communication without resetting the SPI bus when pulled low.
8 VCC Power Supply: Connect to a voltage source (2.5V to 5.5V).

Usage Instructions

How to Use the 25LC128 in a Circuit

  1. Power Supply: Connect the VCC pin to a voltage source (2.5V to 5.5V) and the VSS pin to ground.
  2. SPI Connections:
    • Connect the CS pin to a GPIO pin on the microcontroller to enable/disable the chip.
    • Connect the SCK, SI, and SO pins to the corresponding SPI pins on the microcontroller.
  3. Optional Pins:
    • If write protection is required, connect the WP pin to ground.
    • If the hold function is not used, connect the HOLD pin to VCC.
  4. Pull-Up Resistors: Use pull-up resistors on the CS, WP, and HOLD pins if necessary to ensure proper logic levels.

Important Considerations and Best Practices

  • Write Protection: Enable the write protection feature by pulling the WP pin low to prevent accidental data overwrites.
  • Timing Requirements: Ensure the SPI clock frequency does not exceed the maximum specified value (10 MHz at 4.5V to 5.5V).
  • Page Write Operations: The 25LC128 supports page write operations with a maximum page size of 64 bytes. Exceeding this limit will overwrite data within the same page.
  • Power-Up Timing: Allow sufficient time for the device to power up before initiating communication.

Example: Interfacing the 25LC128 with Arduino UNO

Below is an example of how to interface the 25LC128 with an Arduino UNO using the SPI library:

#include <SPI.h>

// Pin definitions
const int CS_PIN = 10; // Chip Select pin connected to Arduino pin 10

void setup() {
  // Initialize SPI communication
  SPI.begin();
  
  // Configure the CS pin as output
  pinMode(CS_PIN, OUTPUT);
  digitalWrite(CS_PIN, HIGH); // Set CS pin high (inactive)

  Serial.begin(9600);
  Serial.println("25LC128 EEPROM Initialized");
}

void loop() {
  // Example: Write and read a byte from the EEPROM
  byte address = 0x00; // Memory address to write to
  byte dataToWrite = 0x42; // Data to write (example: 0x42)

  // Write data to EEPROM
  writeEEPROM(address, dataToWrite);

  // Read data back from EEPROM
  byte dataRead = readEEPROM(address);

  // Print the read data
  Serial.print("Data read from address 0x");
  Serial.print(address, HEX);
  Serial.print(": 0x");
  Serial.println(dataRead, HEX);

  delay(1000); // Wait for 1 second
}

void writeEEPROM(byte address, byte data) {
  digitalWrite(CS_PIN, LOW); // Activate the chip
  SPI.transfer(0x02);        // Send WRITE instruction
  SPI.transfer(address);     // Send memory address
  SPI.transfer(data);        // Send data byte
  digitalWrite(CS_PIN, HIGH); // Deactivate the chip
  delay(5);                  // Wait for write cycle to complete
}

byte readEEPROM(byte address) {
  digitalWrite(CS_PIN, LOW); // Activate the chip
  SPI.transfer(0x03);        // Send READ instruction
  SPI.transfer(address);     // Send memory address
  byte data = SPI.transfer(0x00); // Read data byte
  digitalWrite(CS_PIN, HIGH); // Deactivate the chip
  return data;
}

Troubleshooting and FAQs

Common Issues and Solutions

  1. No Data Read from EEPROM:

    • Ensure the CS, SCK, SI, and SO pins are correctly connected to the microcontroller.
    • Verify that the SPI clock frequency is within the specified range.
  2. Write Operations Not Working:

    • Check if the WP pin is pulled low, which disables write operations.
    • Ensure the write enable (WREN) instruction is sent before attempting to write data.
  3. Corrupted Data:

    • Avoid exceeding the 64-byte page size during write operations.
    • Ensure proper power supply stability during read/write operations.
  4. Device Not Responding:

    • Verify that the CS pin is being toggled correctly to enable/disable the chip.
    • Check for loose or incorrect wiring.

FAQs

Q: Can I use the 25LC128 with a 3.3V microcontroller?
A: Yes, the 25LC128 operates within a voltage range of 2.5V to 5.5V, making it compatible with 3.3V systems.

Q: How do I erase data from the EEPROM?
A: Data can be overwritten directly by writing new data to the same address. There is no need for a separate erase operation.

Q: What happens if I exceed the page size during a write operation?
A: If you exceed the 64-byte page size, the data will wrap around and overwrite the beginning of the same page.

Q: How long does the data remain stored in the EEPROM?
A: The 25LC128 has a typical data retention period of 200 years under normal operating conditions.