24C02N I2C 2K-Bit EEPROM

256-byte EEPROM is used to provide small non-volatile memory storage DESCRIPTION The 24C02N 256 x 8 (2K)...
Vendor: Keszoox
$0.39
$1.21
$0.39

Shipping

The shipping fee depends on your address

Standard: 9-15 business days,fee is down to $3.99

Express: 4-7 business days,fee is down to $5.99

Support Customization

WE'RE READY TO BUILD A CUSTOM PRODUCT FOR YOU.

If you're looking for a custom product, we can help. Kindly contact us via email support@keszoox.com and send us the details for your need, then we'll let you know how we can deliver the right solution.

Built And process your order

We make into production usually Within 1 - 3 Bussiness Days.

Expect customization orders.
24C02N I2C 2K-Bit EEPROM

24C02N I2C 2K-Bit EEPROM

$1.21 $0.39

24C02N I2C 2K-Bit EEPROM

$1.21 $0.39

256-byte EEPROM is used to provide small non-volatile memory storage

DESCRIPTION

The 24C02N 256 x 8 (2K) EEPROM is used to provide small non-volatile memory storage with easy to access I2C interface.

PACKAGE INCLUDES:

  • 24C02N DIP IC

KEY FEATURES OF 24C02N 256 X 8 EEPROM:

  • 2K-bit memory organized as 256 x 8 bytes
  • I2C Interface
  • 5V compatible

24C02 PinoutThe 24C02N provides 2048 bits of serial Electrically Erasable and Programmable Read-Only Memory (EEPROM) organized as 256 words x 8 bits each.

The device communicates via the I2C two-wire serial interface.  The base I2C address is 0x50.  Three address bits (A2, A1, A0) allow up to 8 devices to be used in the same system.  To use a single chip at address 0x50, you can just ground all 3 address bits.

The Write Protect (PW) pin is grounded to allow normal read/write operations.  If it is pulled high, the device is write protected and becomes a read only device.

These small memories are sometimes used to store configuration information or data acquisition results.

OUR EVALUATION RESULTS:

These devices and larger versions of them can be useful for adding non-volatile memory storage external to the MCU and are fairly easy to use.

The test program here uses raw I2C commands from the Wire.h library to exercise the device.  It first writes the address of the memory locations to each memory address.  So 0 is written to address 0 up to 255 being written to address 255.  It then reads each of the locations to verify that the memory address and data match to ensure the write / read operation was successful.  It then erases the device by writing 0’s to all locations and then verifies that all locations contain 0.

To hook up the device:

  • Connect 5V to Vcc pin and ground to ground pin
  • Connect I2C by connecting SCL to SCL pin and SDA to SDA pin
  • Ground the WP, A0, A1 and A2 pins

24C02 EEPROM Test Program

/*
   Basic 24C02 EEPROM Test Program

   Write data 0-255 to addresses 0-255
   Read data back out and print to serial monitor window
   Erase all data
   Verify data is erased.  Print any not erased to serial monitor window
*/
#include <Wire.h>     // for I2C
#define I2C_Addr 0x50    // device address
byte data = 0; // data to store in or read from the EEPROM
bool data_error = false;
//===============================================================================
//  Initialization - Do everything here since running just once
//===============================================================================
void setup()
{
  Serial.begin(9600);   // Initialize the serial port
  Wire.begin();         // wake up the I2C

  // Write data to entire device
  Serial.println("Writing data...");
  for (int i = 0; i < 256; i++) writeData(i, i);
  Serial.println("Writing Complete");
  delay(1000);

  // Read data back out and print to Serial Monitor
  Serial.println("Reading data...");
  delay(1000);
  for (int i = 0; i < 256; i++)
  {
    Serial.print(i);
    Serial.print(" : ");
    data = readData(i);
    Serial.println(data, DEC);
    if (data != i) data_error = true; // Data should match address
  }
  if (data_error) {
    Serial.println("Error in data Write/Read operation, check log above");
    data_error = false;
  }
  else  Serial.println("Write/Read Completed Successfully");
  delay(1000);

  // Erase the entire EEPROM
  Serial.println("Erasing all data...");
  for (int i = 0; i < 256; i++)
  {
    writeData(i, 0); // Write zeros to all memory locations
  }
  Serial.println("Erasing complete");
  delay(1000);

  //Verify the erase operation
  Serial.println("Verifing data was erased...");
  for (int i = 0; i < 256; i++)
  {
    data = readData(i);
    if (data != 0) {
      Serial.print(i);    // Print all non-zero memory addresses
      Serial.print(" : ");
      Serial.println(data, DEC);
      data_error = true;
    }
  }
  if (data_error) Serial.println("Error(s) in erasing found");
  else Serial.println("EEPROM Erase Verified - Test Complete");
  data_error = false;
}
//===============================================================================
//  Sub writeData - Writes a byte of data to memory address
//===============================================================================
void writeData(unsigned int addr, byte data)
{
  Wire.beginTransmission(I2C_Addr);
  // set the pointer position
  //Wire.write((int)(addr >> 8));
  Wire.write((int)(addr & 0xFF));
  Wire.write(data);
  Wire.endTransmission();
  delay(10);
}
//===============================================================================
//  Sub readData - Reads a byte of data from memory address
//===============================================================================
byte readData(unsigned int addr)
{
  byte result;
  Wire.beginTransmission(I2C_Addr);
  // set the pointer position
  //Wire.write((int)(addr >> 8));
  Wire.write((int)(addr & 0xFF));
  Wire.endTransmission(1);
  Wire.requestFrom(I2C_Addr, 1); // get the byte of data
  result = Wire.read();
  return result;
}
//===============================================================================
//  Main - Nothing to see here....
//===============================================================================
void loop()
{
}

Notes: 

  1. None

TECHNICAL SPECIFICATIONS

Operational Ratings
    Vcc 5V
     Write Cycles Min 500,000
     Data Retention > 40 years
Package Type Plastic body, DIP-8
Mfr China
Datasheet Typical 24C02N

WE'RE READY TO BUILD A CUSTOM PRODUCT FOR YOU.

Contact us:
Support@keszoox.com
What we can help:
If you're looking for a wire or cable assembly, we can help.
What we need your help next:
Kindly contact us via email support@keszoox.com and send us the details fo your need, then we'll let you know how we can deliver the right solution.

Shipping Policy

All orders are dispatched from our warehouse. The shipments are fully tracked—from our door to yours. Please allow 3-5 business days for your order to be processed in addition to the shipping times below.

Shipping Times

Standard: 9-15 business days. Express: 4-7 business days.

Please note that shipping providers are extremely busy during this time, and some orders might experience a delay on top of usual delivery times. If your order is late, please allow 5-10 days more than indicated in standard shipping times before contacting our customer service. Thank you for your understanding.

Tracking

All orders are 100% tracked. You’ll receive an email with a tracking number and a link to track your parcel once your order leaves our warehouse. Please allow 24-48 hours for the tracking link to start showing shipping information.

Related Products

Recently Viewed Products