

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.








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 |
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). |
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;
}
No Data Read from EEPROM:
Write Operations Not Working:
Corrupted Data:
Device Not Responding:
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.