Microchip 24LC21A/P 128K I²C Serial EEPROM: Features and Application Design Guide
The Microchip 24LC21A/P is a 128Kbit (16K x 8) Serial Electrically Erasable PROM (EEPROM) designed to serve as a reliable non-volatile memory solution for a vast array of electronic systems. Leveraging the ubiquitous I²C (Inter-Integrated Circuit) protocol, this device offers a simple two-wire interface, making it an ideal choice for storing configuration parameters, calibration data, and other critical information in applications ranging from consumer electronics to industrial automation.
Key Features and Specifications
The 24LC21A/P stands out due to its robust feature set tailored for ease of integration and dependable performance.
I²C Serial Interface: The device supports the bidirectional 2-wire I²C bus, which minimizes the number of I/O pins required from the host microcontroller, simplifying board layout and reducing system cost.
128Kbit Memory Organization: The memory array is organized as a single block of 16,384 words of 8 bits (16KB) each, providing ample storage for essential data.
Hardware Write-Protection: A dedicated WP (Write-Protect) pin allows the entire memory array to be locked from any write operations. When tied to VCC, the device becomes read-only, safeguarding data from accidental corruption.
Wide Voltage Operation: It operates across a broad voltage range (1.7V to 5.5V), ensuring compatibility with various logic levels, from modern low-power microcontrollers to legacy 5V systems.
Page Write Capability: The device features a 64-byte page write buffer. This allows for faster data writes by enabling the microcontroller to write up to 64 bytes in a single bus cycle, significantly improving efficiency compared to single-byte writes.
High Reliability: With endurance of 1,000,000 erase/write cycles and data retention exceeding 200 years, the 24LC21A/P is built for long-term, reliable data storage.
Multiple Package Options: Available in various packages, including the popular 8-lead PDIP, SOIC, and TSSOP, providing flexibility for different PCB space constraints.
Application Design Guide
Successfully integrating the 24LC21A/P into a design requires attention to a few key hardware and software considerations.
1. Hardware Connection:
The connection is straightforward. The Serial Data (SDA) and Serial Clock (SCL) lines form the I²C bus and must be connected to the corresponding pins on the host microcontroller. These lines require pull-up resistors (typically 4.7kΩ for standard speed) to VCC. The Address pins (A0, A1, A2) are not used for device addressing on this specific model but can be left floating or tied to ground. The Write-Protect (WP) pin must be tied to ground for normal read/write operation or to VCC to enable hardware protection.

2. Device Addressing:
Following a START condition, the master must send a control byte. This byte consists of a 4-bit device code ‘1010’ for the 24LC21A family, followed by three chip select bits. For the 24LC21A, these three bits are internally hard-wired, meaning only one device can reside on the bus per segment. The eighth bit (R/W) specifies a read (‘1’) or write (‘0’) operation.
3. Writing Data:
For a byte write, the master sends the control byte (R/W=0), followed by the 16-bit address (two bytes) of the target memory location, and then the single data byte to be written. For a page write, after sending the address, the master can transmit up to 64 bytes of data consecutively. The internal address pointer automatically increments after each byte; if the end of the page is reached, the pointer will roll over to the start of the same page, potentially overwriting previous data.
4. Reading Data:
There are two primary read sequences: current address read and random read. A current address read simply involves sending the control byte (R/W=1); the device will output data from the address immediately following the last accessed location. A random read, which is more common, requires the master to first send a control byte (R/W=0) and the desired address to set the internal address pointer. The master then issues a START condition again and sends the control byte (R/W=1) to initiate the data output.
5. Acknowledgment Polling:
Once a write command is initiated, the device becomes internally busy for the write cycle time (typically 5ms max). During this period, it will not acknowledge its address. Therefore, the master must perform acknowledge polling: it continues to send the control byte (with R/W=0) until the device acknowledges, indicating the write cycle is complete and the device is ready for new commands.
ICGOOODFIND
The Microchip 24LC21A/P is a quintessential I²C EEPROM that perfectly balances capacity, simplicity, and reliability. Its hardware write-protection and wide operating voltage make it exceptionally robust for securing critical data across diverse and demanding applications. For designers seeking a proven, easy-to-implement non-volatile memory solution, the 24LC21A/P remains a top-tier choice.
Keywords:
1. I²C EEPROM
2. Non-volatile Memory
3. Hardware Write-Protection
4. Page Write
5. Acknowledge Polling
