The Microchip Technology Inc. 25AA128/25LC128
(25XX128
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 dat a out (SO) lines . Access to the
device is controlled through a Chip Select (CS
Communication to the device can be paused via the
hold pin (HOLD). While the device is paused,
transitions on its inputs will be ignored, with the
exception of Chip Select, allowing the host to service
higher priority interrupts.
The 25XX128 is available in standard packages
including 8-lead PDIP and SOIC, and advanced
packaging including 8-lead DFN and 8-lead TSS OP.
*
) are 128k-bit Serial Electrically Erasable
) input.
Package Types (not to scale)
CS
Chip Select Input
SOSerial Data Output
Write-Protect
Hold Input
WP
SSGround
V
SISerial Data Input
SCKSerial Clock Input
HOLD
CCSupply Voltage
V
* 25XX128is used in this document as a generic part number for the 25AA128, 25LC128 devices.
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 25XX128 is a 16,384 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 PIC
microcontrollers. It may also interface with microcontrollers that do not have a built-i n SPI port by usin g discrete I/O lines programmed properly in firmware to
match the SPI protocol.
The 25XX128 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 transf erred 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
mode. After releasing the HOLD
resume from the point when the HOLD
goes low. If the clock line is sha red wit h ot her
input and place the 25XX128 in ‘HOLD’
pin must be high fo r the entire
pin, operation will
pin must
was asserted.
2.2Read Sequence
The device is selected by pulling CS low. The 8-bit
READ instruction is transmitted to the 25XX128 followed by the 16-bit address, with two MSBs of the
address being “don’t care” bits. After the correct READ
instruction and add res s a re s en t, the data stored in the
memory 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 clock pulses . The inter nal Address Pointer is automatically incremented to the next higher address after
each byte of data is shifted out. When the highest
address is reached (3FFFh), the address counter rolls
over to address 0000h, allowing the read cycle to be
continued indefi nitely. The read opera tion is te rminated
by raising the CS
pin (Figure 2-1).
2.3Write Sequence
Prior to any attempt to write data to the 25XX128, 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
25XX128. 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 two
MSBs of the address being “don’t care” bits, and then
the data to be written. Up to 64 bytes of data can 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 buffer size (or
‘page size’) and, end at addresses that are
integer multiples of page size – 1. If a
Page Write command attempts to write
across 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 p age 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 a fter the Leas t Significan t 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 progre ss, the ST A TUS regi ster 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.
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
The 25XX128 contains a write enable latch. See
T abl e 2-4 for the Write-Protect func tionality ma trix. This
latch must be set before any write operation will be
completed internally. The WREN instruction will set the
latch, and the WRDI will reset the latch.
FIGURE 2-4:WRITE ENABLE SEQUENCE (WREN)
The following is a list of conditions under which the
write enable latch will be reset:
The Read Status Register instruction (RDSR) provides
access to the STATUS register. The STATUS register
may be read at any time, ev en during a wri te cycle. The
STATUS register is formatted as follows:
TABLE 2-2:STATUS REGISTER
7654 3210
W/R –––W/RW/R R R
WPENXXXBP1BP0WELWIP
W/R = writable/readable. R = read-only.
The Write-In-Process (WIP) bit indicates whether the
25XX128 is busy with a write operation. When set to a
1’, a write is in progress, when set to a ‘0’, no write is
‘
in progress. This bit is read-only.
The Wri te Enable Lat ch (WEL) bit indicat es the st atus
of the write enabl e la tch and i s read -o nly. When set to
a ‘
1’, the latch allows writes to the array, when set to a
0’, the latch prohibits writes to the array. The state of
‘
this bit can always be updated via the WREN or WRDI
commands regardless of the state of write protection
on the STATUS register. These commands are shown
in Figure 2-4 and Figure 2-5.
The Block Protection (BP0 and BP1) bits indicate
which blocks are currently write-protected. These bits
are set by the user issuing the WRSR instruction . These
bits are nonvolatile, and are shown in Table 2-3.
See Figure 2-6 for the RDSR timing sequence.
FIGURE 2-6:READ STATUS REGISTER TIMING SEQUENCE (RDSR)
The Write Status Register (WRSR) instruction allows the
user to write to the nonvolatile bits in the STATUS register as shown in Table 2-2. The user is able to select
one of four levels of protection for the array by writing
to the appropriate bits in the STATUS register. The
array is divided up into four segments . The user has the
ability to write-protect none, one, two, or all four of the
segments of the array. The partitioning is controlled as
shown in Table 2-3.
The Write-Protect Enable (WPEN) bit is a nonvolatile
bit that is available as an enable bi t for the WP
Write-Protect (WP
(WPEN) bit in the STATUS register control the
programmable hardware write-protect feature. Hardware write protection is enabled when WP
and the WPEN bit is high. Hardware write protection is
disabled when either the WP
bit is low. When the chip is hardware write-protected,
) pin and the Write-Protect Enable
pin is high or the WPEN
pin. The
pin is low
only writes to nonvolatile bits in the STATUS register
are disabled. See Table 2-4 for a matrix of functionality
on the WPEN bit.
See Figure 2-7 for the WRSR timing sequence.
TABLE 2-3:ARRAY PROTECTION
BP1BP0
00
01
10
11
FIGURE 2-7:WRITE STATUS REGISTER TIMING SEQUENCE (WRSR)
Array Addresses
Write-Protected
none
upper 1/4
(3000h-3FFFh)
upper 1/2
(2000h-3FFFh)
all
(0000h-3FFFh)
Note:An internal write cycle (TWC) is initiated on the rising edge of CS after a valid write STATUS register
The descriptions of the pins are listed in Table 3-1.
TABLE 3-1:PIN FUNCTION TABLE
Name
CS
SO24Serial Data Output
WP35Write-Protect Pin
V
SS46Ground
SI57Serial Data Input
SCK68Serial Clock Input
HOLD
V
CC82Supply Voltage
Note:The exposed pad on the DFN package
Pin
Number
can be connected to VSS or left floating.
3.1Chip Select (CS)
A low level on this pin selects the device. A high level
deselects the device and forces it into Standby mode.
However, a programming cycle which is already
initiated or in progress will be completed, regardle ss of
the CS input signal. If CS is brought high during a
program cycle, the de vice wil l go into S t andb y mode as
soon as the programming cycle is complete. When the
device is deselected, SO goes to the high-impedance
state, allowing multiple parts to share the same SPI
bus. A low-to-high transition on CS
sequence initiates an internal write cycle. After powerup, a low level on CS is r equ ired p r ior to any sequence
being initiated.
X-Rotated
Pin
Number
13Chip Select Input
71Hold Input
Function
after a valid write
The WP
the STATUS register is low. This allows the user to
install the 25XX128 in a system with WP pin grounded
and still be able to write to the STATUS register. The
WP
set high.
pin function is blocked when the WPEN bit in
pin functions will be enabled when the WPEN bit is
3.4Serial In p u t (SI)
The SI pin is used to transfer data into the device. It
receives instructions, addresses and data. Data is
latched on the rising edge of the serial clock.
3.5Serial Clock (SCK)
The SCK is used to synchronize the communication
between a master and the 25XX128. Instructions,
addresses or data pres en t on th e SI pin are latched on
the rising edge of t he c lo ck in put, while data on the SO
pin is updated after the falling edge of the clock input.
3.6Hold (HOLD)
The HOLD pin is used to suspend transmission to the
25XX128 while in the mid dle of a seri al sequ ence wit hout having to retransmit the entire sequence again. It
must be held high any time this function is not being
used. Once the device is selected and a serial
sequence is underway, the HOLD
low to pause further serial communication without
resetting the serial sequence. The HOLD pin must be
brought low while SCK is low, otherwise the HOLD
function will not be invoked until the next SCK high-tolow transition. The 25XX128 must remain selected
during this sequence. The SI, SCK and SO pins are in
a high-impedance state during the time the device is
paused and transitions on these p ins will be ignored. To
resume serial communication, HOLD
high while the SCK pin is low, otherwise serial
communication will not resume. Lowering the HOLD
line at any time will tri-state the SO line.
pin may be pulled
must be brought
3.2Serial Output (SO)
The SO pin is used to transfer data out of the 25XX128.
During a read cycle, data is shifted out on this pin after
the falling edge of the serial clock.
3.3Write-Protect (WP)
This pin is used in conjunction with the WPEN bit in the
STATUS register to prohibit writes to the nonvolatile
bits in the STATUS register. When WP is low and
WPEN is high, writing to the nonvolatile bits in the
STATUS register is disabled. All other operations
function normally. When WP
including writes to the nonvolatile bits in the STATUS
register, operate normally. If the WPEN bit is set, WP
low during a STATUS register write sequence will disable writing to the STATUS register. If an internal write
cycle has already begun, WP
effect on the write.
YYear code (last digit of calendar year)
YYYear code (last 2 digits of calendar year)
WWWeek code (week of January 1 is week ‘01’)
NNNAlphanumeric traceability code
Pb-free JEDEC designator for Matte Tin (Sn)
*This package is Pb-free. The Pb-free JEDEC designator ()
can be found on the outer packaging for this package.
Note:In the event the full Microchip part nu mber ca nnot be m arked on one line , it will
be carried over to the next line, thus limiting the number of available
characters for customer-specific information.
8-Lead Plastic Dual Flat, No Lead Package (MF) – 6x5 mm Body [DFN-S]
PUNCH SINGULATED
Notes:
1. Pin 1 visual index feature may vary, but must be located within the hatched area.
2. Package may have one or more exposed tie bars at ends.
3. Dimensioning and tolerancing per ASME Y14.5M.
BSC: Basic Dimension. Theoretically exact value shown without tolerances.
REF: Reference Dimension, usually without tolerance, for information purposes only.
Note:For the most current package drawings, please see the Microchip Packaging Specification located at
Added X-Rotated TSSOP to package types; Revised
Table 1-2, Param. 21; Revised Table 3-1; Revised
TSSOP Line Marking tab le; Added SOI C Land Pattern;
Revised Product ID section.
Microchip provides onlin e support v ia our W WW site at
www.m ic roc hi p.c om . Thi s web si te i s us ed as a m ean s
to make files and information easily available to
customers. Accessible by using your favorite Internet
browser, the web site contains the following
information:
• Product Support – Data sheets and errata,
application notes and sample programs, design
resources, user’s guides and hardware support
documents, latest software releases and archived
software
• General Technical Support – Frequently Asked
Questions (FAQ), technical support requests,
online discussion groups, Microchip consultan t
program member listing
• Business of Microchip – Product selector and
ordering guides, latest Microchip press releases,
listing of s eminars and events, listings of
Microchip sales offices, distributors and factory
representatives
CUSTOMER CHANGE NOTIFICATION
SERVICE
CUSTOMER SUPPORT
Users of Microchip products can receive assistance
through several channels:
• Distributor or Representative
• Local Sales Office
• Field Application Engineer (FAE)
• Technical Support
• Development Systems Information Line
Customers should contact their distributor,
representative or field application engineer (FAE) for
support. Local sales offices are also available to help
customers. A listing of sales offices and locations is
included in the back of this document.
T echnic al suppo rt is avail able throug h the web si te
at: http://support.microchip.com
Microchip’s customer notification service helps keep
customers current on Microchip products. Subscribers
will receive e-mail notification whenever there are
changes, updates, revisions or errata related to a
specified produ ct family or develo pment tool of inte rest.
To register, access the Microchip web site at
www.microchip.com, click on Customer Change
Notification and follow the registration instructions.
Application (optional):
Would you like a reply? Y N
Device: Literature Number:
Questions:
FAX: (______) _________ - _________
DS21831D25AA128/25LC128
READER RESPONSE
It is our intentio n to pro vi de you with the best documentation possible to ens ure suc c es sfu l u se of y ou r M ic roc hip product. If you wish to provid e your c omment s on org anizatio n, clarity, subject matter , and ways in w hich o ur document atio n
can better serve you, please FAX your comments to the Technical Publications Manager at (480) 792-4150.
Please list the following information, and use this outline to provide us with your comments about this document.
1. What are the best featur es of this document?
2. How does this document meet your hardware and software development needs?
3. Do you find the organization of this document easy to follow? If not, why?
4. What additions to the document do you think would enhance the structure and subject?
5. What deletions from the document could be made without affecting the overall usefulness?
6. Is there any incorrect or misleading information (what and where)?
Note the following details of the code protection feature on Microchip devices:
•Microchip products meet the specification contained in their particular Microchip Data Sheet.
•Microchip believes that its family of products is one of the most secure families of its kind on the market today , when used in the
intended manner and under normal conditions.
•The re are dishonest and possibly illegal methods used to breach the code protection feature. All of these methods, to our
knowledge, require using the Microchip products in a manner outside the operating specifications contained in Microchip’s Data
Sheets. Most likely, the person doing so is engaged in theft of intellectual property.
•Microchip is willing to work with the customer who is concerned about the integrity of their code.
•Neither Microchip nor any other semiconductor manufacturer can guarantee the security of their code. Code protection does not
mean that we are guaranteeing the product as “unbreakable.”
Code protection is constantly evolving. We at Microchip are com mitted to continuously improving the c ode prot ection f eatures of our
products. Attempts to break Microchip’s code protection feature may be a violation of t he Digit al Mill ennium Copyright Act. If such act s
allow unauthorized access to your software or other copyrighted work, you may have a right to sue for relief under that Act.
Information contained in this publication regarding device
applications and t he lik e is provided only for your convenience
and may be su perseded by upda tes. It is your responsibility to
ensure that your application meets with your specifications.
MICROCHIP MAKES NO REPRESENTATIONS OR
WARRANTIES OF ANY KIND WHETHER EXPRESS OR
IMPLIED, WRITTEN OR ORAL, STATUTORY OR
OTHERWISE, RELATED TO THE INFORMATION,
INCLUDING BUT NOT LIMITED TO ITS CONDITION,
QUALITY, PERFORMANCE, MERCHANTABILITY OR
FITNESS FOR PURPOSE. Microchip disclaims all liability
arising from this information and its use. Use of Microchip
devices in life supp ort and/or safety ap plications is entir ely at
the buyer’s risk, and the buyer agrees to defend, indemnify and
hold harmless M icrochip from any and all dama ges, claims,
suits, or expenses re sulting from such use. No licens es are
conveyed, implicitly or otherwise, under any Microchip
intellectual property rights.
Trademarks
The Microchip name and logo, the Microchip logo, dsPIC,
K
rfPIC and UNI/O are registered trademarks of Microchip
Technology Incorporated in the U.S.A. and other countries.
FilterLab, Hampshire, HI-TECH C, Linear Active Thermistor,
MXDEV, MXLAB, SEEVAL and The Embedded Control
Solutions Company are registered trademarks of Microchip
Technology Incorporated in the U.S.A.
Analog-for-the-Digital Age, Application Maestro, CodeGuard,
dsPICDEM, dsPICDEM.net, dsPICworks, dsSPEAK, ECAN,
ECONOMONITOR, FanSense, HI-TIDE, In-Circuit Serial
Programmin g , IC SP, ICEPIC, Min d i , M iW i, MPASM, MPLAB
Certified logo, MPLIB, MPLINK, mTouch, nanoWatt XLP,
Omniscient Code Generation, PICC, PICC-18, PICkit,
PICDEM, PICDEM.net, PICtail, PIC
32
logo, REAL ICE, rfLAB,
Select Mode, Total Endurance, TSHARC, WiperLock and
ZENA are trademarks of Microchip Technology Incorporated
in the U.S.A. and other countries.
SQTP is a service mark of Microchip T echnology Incorporated
in the U.S.A.
All other trademarks mentioned herein are property of their
respective companies.
Microchip received ISO/TS-16949:2002 certification for its worldwide
headquarters, design and wafer fabrication facilities in Chandler and
Tempe, Arizona; Gresham, Oregon and design centers in California
and India. The Company’s quality system processes and procedures
are for its PIC
devices, Serial EEPROMs, microperipherals, nonvolatile memory and
analog products. In addition, Microchip’s quality system for the design
and manufacture of development systems is ISO 9001:2000 certified.