602-00013

Web Site: www.parallax.com
Forums: forums.parallax.com
Sales: sales@parallax.com
Technical: support@parallax.com
Office: (916) 624-8333
Fax: (916) 624-8003
Sales: (888) 512-1024
Tech Support: (888) 997-8267
© Parallax, Inc. • 24LC128 (#602-00013) • 08/2005 v2.0 Page 1 of 5
24LC128 (#602-00013)
General Description
The 24LC128 is a 128 Kb (16K X 8) I²C CMOS Serial EEPROM that can provide additional non-volatile data
storage for the BASIC Stamp
®
2
Modules. The 8-pin DIP package is easy to interface to the BS2, BS2e,
BS2sx, BS2p24/40, BS2pe and BS2px24.
Features
Low-power CMOS technology
Maximum write current 3 mA at 5.5 V
Maximum read current 400 µA at 5.5 V
Standby current 100 nA typical at 5.5 V
5 mS max write cycle time
1,000,000 erase/write cycles
2-wire serial interface, I²C™ compatible
8-pin .300” DIP Package
Compatible with all BASIC Stamp
2 and SX Modules
Application Ideas
Data storage
Data tables
Quick Start Circuit
© Parallax, Inc. • 24LC128 (#602-00013) • 08/2005 v2.0 Page 2 of 5
Connecting and Testing
Connect the 24LC128 as shown in the Quick Start Circuit, then use the appropriate demo program for
your BASIC Stamp module to verify correct operation. If you are using an SX Microcontroller you will
need to write or edit some existing I²C code to access the EEPROM.
Resources and Downloads
Check out the 24LC128 product page for example programs, articles and more:
http://www.parallax.com/detail.asp?product_id=602-00013
Device Information
Pin Definitions and Ratings
Pin Name Function
1 A0 Address Pin 0
2 A1 Address Pin 1
3 A2 Address Pin 2
4 Vss Ground -> 0 V
5 SDA Serial Data Input/Output
6 SCL Synchronous Clock Input
7 WP Write-Protect Pin
8 Vcc +5 V Power Input
Symbol Quantity Minimum Typical Maximum Units
Vcc Supply Voltage 2.5 5.0 6.5 V
GND Ground 0 V
Icc (sb) Standyby Supply Current 100 nA
Ir Read Current 400 uA
Iw Write Current 3 mA
* Ratings from manufacturer datasheet
© Parallax, Inc. • 24LC128 (#602-00013) • 08/2005 v2.0 Page 3 of 5
Communication Protocol
The 24LC128 communicates over the I²C bus with various types of transactions, such as Byte Write,
Page Write, Random Read and Sequential Read.
All communication with the 24LC128 requires a control byte to be sent. This control byte includes a Start
Bit, the Control Code (4 bits), the Chip Select (3 bits) and the R/W bit.
The address lines (A0, A1, A2) are used to select multiple 24LC128 devices on the same bus. Up to 8
24LC128 devices can be connected to the same bus.
Please see the manufacturer datasheet from Microchip for more information on reading/writing data to
the 24LC128.
Source Code
BASIC Stamp
®
2, 2e, 2sx Program
This program will allow you to use the 24LC128 with the BASIC Stamp 2, 2e and 2sx.
' =========================================================================
' File....... 24LC128.bs2
' Purpose.... Interface To A 24LC128 16KB EEPROM
' Author..... Parallax, Inc.
' E-mail..... support@parallax.com
' Updated.... 08-09-2005
' {$STAMP BS2}
' {$PBASIC 2.5}
' -----[ Program Description ]---------------------------------------------
' This code will interface the BS2, BS2e and BS2sx to a 24LC128 16KB EEPROM
' -----[ I/O Definitions ]-------------------------------------------------
SDA PIN 0 ' I2C Serial Data Line
SCL PIN 1 ' I2C Serial Clock Line
' -----[ Constants ]-------------------------------------------------------
Address CON $A0 ' Address Of 24LC128
Ack CON 0 ' Acknowledge Bit
' -----[ Variables ]-------------------------------------------------------
temp VAR Byte ' Variable Used For Work
i2cWork VAR Word ' Work Byte For I2C I/O
i2cAck VAR Bit ' Ack Bit From Device
eeprom_add VAR Word ' EEPROM Address
' -----[ Main Routine ]----------------------------------------------------
DO
DEBUG "Enter value to store from 0 to 255: "

602-00013

Mfr. #:
Manufacturer:
Parallax
Description:
EEPROM 16K-Byte EEPROM (BS2SX - DIP)
Lifecycle:
New from this manufacturer.
Delivery:
DHL FedEx Ups TNT EMS
Payment:
T/T Paypal Visa MoneyGram Western Union

Products related to this Datasheet