is used in this document as a generic part number for the 25AA256, 25LC256 devices.
Description
The Microchip Technology Inc. 25AA256/25LC256
(25XX256
PROMs. The memory is accessed via a simple Serial
Peripheral Interface™ (SPI™) compatible serial bus.
The bus signals required are a clock input (SCK) plus
separate data in (SI) and data out (SO) lines. Access to
the device is controlled through a Chip Select (CS
input.
Communication to the device can be paused via the
hold pin (HOLD
transitions on its inputs will be ignored, with the
exception of Chip Select, allowing the host to service
higher priority interrupts.
The 25XX256 is available in standard packages
including 8-lead PDIP and SOIC, and advanced
packaging including 8-lead DFN and 8-lead TSSOP.
Pb-free (Pure Sn) finish is also available.
*
) are 256k-bit Serial Electrically Erasable
). While the device is paused,
Package Types (not to scale)
TSSOP
(ST)
1
CS
2
SO
3
WP
4
V
SS
SPI is a registered trademark of Motorola Corporation.
SS ......................................................................................................... -0.6V to VCC +1.0V
Storage temperature .................................................................................................................................-65°C to 150°C
Ambient temperature under bias...............................................................................................................-40°C to 125°C
ESD protection on all pins..........................................................................................................................................4 kV
† NOTICE: Stresses above those listed under “Absolute Maximum Ratings” may cause permanent damage to the
device. This is a stres s ratin g only and func tional operati on of the devic e at thos e or any other co nditio ns abov e thos e
indicated in the operational listings of this specification is not implied. Exposure to maximum rating conditions for an
extended period of time may affect device reliability.
The 25XX256 is a 32768 byte Serial EEPROM
designed to interf ace di rec tly with the Serial Peripheral
Interface (SPI) port of many of today’s popular
microcontroller families, including Microchip’s
PICmicro
microcontrollers that do not have a built-in SPI port by
using discrete I/O lines programmed properly in
firmware to match the SPI protocol.
The 25XX256 conta ins an 8-bit instr uction regi ster . The
device is accessed via the SI pin, with data being
clocked in on the rising edge of SCK. The CS
be low and the HOLD
operation.
Table 2-1 contains a list of the possible instruction
bytes and format for device operation. All instructions,
addresses, and data are transferred MSB first, LSB
last.
Data (SI) is sampled on the first rising edge of SCK
after CS
peripheral devices on the SPI bus, the user can assert
the HOLD input and place the 25XX256 in ‘HOLD’
mode. After releasing the HOLD
resume from the point when the HOLD
®
microcont rollers. It may also interfac e with
pin must
pin must be high fo r the entire
goes low. If the clock line is shared with other
pin, operation will
was asserted.
2.2Read Sequence
The device is sele cted by p ulling CS low. The 8-bit read
instruction is transmitted to the 25XX256 followed by
the 16-bit address, with the first MSB of the address
being a don’t care bit. After the correct read instruction
and address are sent, the d ata st ored i n the memo ry at
the selected address is shifted out on the SO pin. The
data stored in the memory at the next address can be
read sequentially by continuing to provide c lock pulses .
The internal address pointer is automatically incremented to the next higher address after each byte of
data is shifted out. When the highest address is
reached (7FFFh), the address counter rolls over to
address 0000h allow in g th e rea d c yc le to b e co nti nue d
indefinitely. The read operation i s term inated by rai sing
pin (Figure 2 -1).
the CS
2.3Write Sequence
Prior to any attempt to write data to the 25XX256, the
write enable latch must be set by issuing the WREN
instruction (Figure2-4). This is done by setting CS low
and then clocking out the proper instruction into the
25XX256. After all eight bits of the instruction are
transmitted, the CS
write enable latch. If the write operation is initiated
immediately after the WREN instruction without CS
being brought high, the data will not be written to the
array because the write enable latc h will not hav e been
properly set.
Once the write enable latch is set, the user may
proceed by setting the CS
instruction, followed by the 16-bit address, with the first
MSB of the address bein g a don’t c are bit, and then the
data to be writ ten. Up to 64 bytes of d ata ca n be sent to
the device before a write cycle is necessary. The only
restriction is that all of the bytes must reside in the
same page.
Note:Page write operations are limited t o writing
bytes within a single physical page,
regardless of the number of bytes
actually being written. Physical page
boundaries start at addresses that are
integer multiples of the page buf fer size (or
‘page size’) and, end at addresses that are
integer multiples of page size - 1. If a Page
Write comman d attem pt s to wri te a cross a
physical page boundary, the result is that
the data wraps around to the beginning of
the current page (overwriting data
previously stored there), instead of being
written to the next page as might be
expected. It is therefore necessary for the
application software to prevent page write
operations that would attempt to cross a
page boundary.
For the data to be actually written to the array, the CS
must be brought high after the Leas t Significant bit (D0)
of the n
brought high at any other time, the write operation will
not be completed. Refer to Figure 2-2 and Figure 2-3
for more detailed illustrations on the byte write
sequence and the page write sequence respectively.
While the write is in progress, the Status register may
be read to check the status of the WPEN, WIP, WEL,
BP1 and BP0 bits (Figure 2-6). A read attempt of a
memory array location will not be possible during a
write cycle. When the write cycle is completed, the
write enable latch is reset.
th
data byte has been clocked in. If CS is
must be brought high to set the
low, issuing a WRITE
DS21822C-page 6Preliminary 2003 Microchip Technology Inc.
Read data from memory array beginning at selected address
Write data to memory array beginning at selected address
Reset the write enable latch (disable write operations)
Set the write enable latch (enable write operations)
Read Status register
Write Status register