← All parts

AT24C256

AT24C256

Memory

256Kb I2C serial EEPROM in the standard 8-pin layout (A0-A2 address, SDA/SCL, WP).

In stock

Specifications

0

No specs listed.

Pinout

8
PinNameFunctionsNotes
1A0
GPIO
Address 0
2A1
GPIO
Address 1
3A2
GPIO
Address 2
4VSS
GND
Ground
5SDA
I2C
I2C data
6SCL
I2C
I2C clock
7WP
GPIO
Write protect
8VCC
POWER
Supply

Interactive pinout

Highlight:
AT24C256

Click a pin to copy its name · tap a tag above to spotlight a bus.

Starter code

Community starter examples — minimal, unofficial, and provided to get you wiring fast. Verify against the manufacturer datasheet before relying on them.

Arduino (C++)

arduino
// AT24C256 I2C EEPROM (32 KB) — community starter example
// Identical protocol to AT24C32 (2-byte word address), just larger.
#include <Wire.h>

const byte EEPROM_ADDR = 0x50;

void writeByte(uint16_t addr, byte data) {
  Wire.beginTransmission(EEPROM_ADDR);
  Wire.write(addr >> 8); Wire.write(addr & 0xFF);
  Wire.write(data);
  Wire.endTransmission();
  delay(5);
}

byte readByte(uint16_t addr) {
  Wire.beginTransmission(EEPROM_ADDR);
  Wire.write(addr >> 8); Wire.write(addr & 0xFF);
  Wire.endTransmission();
  Wire.requestFrom(EEPROM_ADDR, (byte)1);
  return Wire.read();
}

void setup() {
  Serial.begin(115200);
  Wire.begin();
  writeByte(100, 7);
  Serial.println(readByte(100));   // -> 7
}

void loop() {}

MicroPython

python
# AT24C256 I2C EEPROM (ESP32) — community starter example
from machine import Pin, I2C
import time

i2c = I2C(0, scl=Pin(22), sda=Pin(21))
ADDR = 0x50

i2c.writeto_mem(ADDR, 100, b"\x07", addrsize=16)
time.sleep_ms(5)
print(i2c.readfrom_mem(ADDR, 100, 1, addrsize=16))

Wiring

PinArduino Uno R3ESP32 DevKitC (WROOM-32)Notes
VCC+5V3V31.7-5.5 V
GNDGNDGND
SCLA5/SCLGPIO22I2C clock
SDAA4/SDAGPIO21I2C data
A0/A1/A2--Address select -> 0x50-0x57
WPGNDGNDLOW = writable

Typical uses

  • 32 KB non-volatile storage
  • Calibration data and logs

Related parts

6