The Microchip Technology Inc. 25AA040/25LC040/
25C040 (25xx040
able PROM. 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
Communication to the device can be paused via the
hold pin (HOLD
tions on its inputs will be ignored, with the exception of
chip select, allowing the host to service higher priority
interrupts. Also, write operations to the device can be
disabled via the write protect pin (WP
*25xx040 is used in this document as a generic part number for the 25AA040/25LC040/25C040 devices.
SPI is a trademark of Motorola.
All inputs and outputs w.r.t. Vss.................. -0.6V to Vcc+1.0V
Storage temperature.......................................-65˚C to 150˚C
Ambient temperature under bias..................... -65˚C to 125˚C
Soldering temperature of leads (10 seconds).............+300˚C
ESD protection on all pins.................................................4kV
*Notice: Stresses above those listed under ‘Maximum ratings’ may
cause permanent damage to the device. This is a stress rating only and
functional operation of the device at those or any other conditions
above those 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
TABLE 1-1:PIN FUNCTION TABLE
CHARACTERISTICS
um Ratings*
NameFunction
CS
SOSerial Data Output
SISerial Data Input
SCKSerial Clock Input
WP
SS
V
CC
V
HOLD
Chip Select Input
Write Protect Pin
Ground
Supply Voltage
Hold Input
FIGURE 1-1:AC TEST CIRCUIT
VCC
2.25 K
SO
1.8 K
1.2A
C Test Conditions
AC Waveform:
= 0.2V
LO
V
HI
CC
V
= V
- 0.2V (Note 1)
= 4.0V (Note 2)
HI
V
Timing Measurement Reference Level
Input0.5 V
Output0.5 V
For V
CC
> 4.0V
CC
4.0V
Note 1: For V
100 pF
CC
CC
TABLE 1-2:DC CHARACTERISTICS
All parameters apply over the
specified operating ranges
unless otherwise noted.
Commercial (C): T
Industrial (I): T
Automotive (E): T
Note 1: This parameter is periodically sampled and not 100% tested.
2: This parameter is not tested but guaranteed by characterization. For endurance estimates in a specific application, please
consult the Total Endurance Model which can be obtained on Microchip’s BBS or website.
Commercial (C): Tamb = 0 ° C to +70 ° CV
Industrial (I): Tamb = -40 ° C to +85 ° CV
Automotive (E): Tamb = -40°C to +125°CVCC = 4.5V to 5.5V (25C040 only)
3
—
—
250
500
250
475
50
50
100
100
250
475
250
475
TV—
—
—
—
—
100
200
100
200
150
200
150
200
2
1
—
—
—
—
—
—
—
—
—
—
—
—
—
—
—
—
—
—
150
250
475
200
250
500
—
—
—
—
—
—
—
—
—
—
—
—
CC
= 1.8V to 5.5V
CC = 1.8V to 5.5V
MHz
MHz
MHz
ns
ns
ns
ns
ns
ns
ns
ns
ns
ns
ns
ns
ns
ns
ns
ns
ns
ns
ns
ns
ns
ns
ns
ns
ns
ns
ns
ns
ns
ns
ns
ns
ns
ns
ns
ns
VCC = 4.5V to 5.5V
VCC = 2.5V to 4.5V
VCC = 1.8V to 2.5V
VCC = 4.5V to 5.5V
VCC = 2.5V to 4.5V
VCC = 1.8V to 2.5V
VCC = 4.5V to 5.5V
VCC = 2.5V to 4.5V
VCC = 1.8V to 2.5V
VCC = 4.5V to 5.5V
VCC = 2.5V to 4.5V
VCC = 1.8V to 2.5V
VCC = 4.5V to 5.5V
VCC = 2.5V to 4.5V
VCC = 1.8V to 2.5V
VCC = 4.5V to 5.5V
VCC = 2.5V to 4.5V
VCC = 1.8V to 2.5V
VCC = 4.5V to 5.5V
VCC = 2.5V to 4.5V
CC = 1.8V to 2.5V
V
VCC = 4.5V to 5.5V
VCC = 2.5V to 4.5V
VCC = 1.8V to 2.5V
VCC = 4.5V to 5.5V (Note 1)
VCC = 2.5V to 4.5V (Note 1)
VCC = 1.8V to 2.5V (Note 1)
VCC = 4.5V to 5.5V
VCC = 2.5V to 4.5V
VCC = 1.8V to 2.5V
VCC = 4.5V to 5.5V
VCC = 2.5V to 4.5V
VCC = 1.8V to 2.5V
VCC = 4.5V to 5.5V (Note 1)
VCC = 2.5V to 4.5V (Note 1)
VCC = 1.8V to 2.5V (Note 1)
VCC = 4.5V to 5.5V
VCC = 2.5V to 4.5V
VCC = 1.8V to 2.5V
1997 Microchip Technology Inc.
Preliminary
DS21204A-page 3
25AA040/25LC040/25C040
FIGURE 1-2:HOLD TIMING
CS
THH
THSTHSTHH
SCK
SO
SI
n+2n+1nn-1
n+2n+1n
HOLD
FIGURE 1-3:SERIAL INPUT TIMING
high impedance
don’t care
THVTHZ
n
TSU
n
n-1
CS
TCSS
THDTsu
MSB in
high impedance
SCK
SI
SO
Mode 1,1
Mode 0,0
FIGURE 1-4:SERIAL OUTPUT TIMING
CS
THI
SCK
TV
TLO
TR
THC
TF
TCSD
TCLE
TCLD
TCSH
LSB in
TCSH
Mode 1,1
Mode 0,0
TDIS
SO
SI
DS21204A-page 4Preliminary 1997 Microchip Technology Inc.
MSB out
don’t care
ISB out
25AA040/25LC040/25C040
2.0PIN DESCRIPTIONS
2.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, regardless of the
CS
input signal. If CS is brought high during a program
cycle, the device will go in standby mode as soon as
the programming cycle is complete. As soon as 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
being initiated.
is required prior to any sequence
2.2Serial Input (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.
2.3Serial Output (SO)
The SO pin is used to transfer data out of the 25xx040.
During a read cycle, data is shifted out on this pin after
the falling edge of the serial clock.
2.4Serial Clock (SCK)
The SCK is used to synchronize the communication
between a master and the 25xx040. Instructions,
addresses, or data present on the SI pin are latched
on the rising edge of the clock input, while data on the
SO pin is updated after the falling edge of the clock
input.
after a valid write
2.5Write Protect (WP)
This pin is a hardware write protect input pin. When
WP
is low, all writes to the array or status register are
disabled, but any other operation functions normally.
When WP
writes operate normally. WP
reset the write enable latch and inhibit programming,
except when an internal write has already begun. If an
internal write cycle has already begun, WP
will have no effect on the write. See Table 3-2 for Write
Protect Functionality Matrix.
is high, all functions, including non-volatile
going low at any time will
going low
2.6Hold (HOLD)
The HOLD pin is used to suspend transmission to the
25xx040 while in the middle of a serial sequence without having to re-transmit the entire sequence over at a
later time. 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
pulled low to pause further serial communication without resetting the serial sequence. The HOLD
be brought low while SCK is low, otherwise the HOLD
function will not be invoked until the next SCK high to
low transition. The 25xx040 must remain selected during this sequence. The SI, SCK, and SO pins are in a
high impedance state during the time the part is
paused and transitions on these pins will be ignored.
To resume serial communication, HOLD
brought 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.
The 25xx040 is a 512 byte Serial EEPROM designed
to interface directly with the Serial Peripheral Interface
(SPI) port of many of today’s popular microcontroller
families, including Microchip’s PIC16C6X/7X microcontrollers. It may also interface with microcontrollers
that do not have a built-in SPI port by using discrete
I/O lines programmed properly with the software.
The 25xx040 contains an 8-bit instruction register. The
part is accessed via the SI pin, with data being clocked
in on the rising edge of SCK. The CS
and the HOLD
tion. The WP
the memory array.
Table 3-1 contains a list of the possible instruction
bytes and format for device operation. The most significant address bit (A8) is located in the instruction byte.
All instructions, addresses, and data are transferred
MSB first, LSB last.
Data is sampled on the first rising edge of SCK after
CS
goes low. If the clock line is shared with other
peripheral devices on the SPI bus, the user can assert
the HOLD
mode. After releasing the HOLD
resume from the point when the HOLD
pin must be high for the entire opera-
pin must be held high to allow writing to
input and place the 25xx040 in ‘HOLD’
3.2Read Sequence
The part is selected by pulling CS low. The 8-bit read
instruction with the A8 address bit is transmitted to the
25xx040 followed by the lower 8-bit address (A7
through A0). After the correct read instruction and
address are sent, 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
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
(01FFh), the address counter rolls over to address
0000h allowing the read cycle to be continued indefinitely. The read operation is terminated by raising the
CS
pin (Figure 3-1).
pin must be low
pin, operation will
was asserted.
3.3Write Sequence
Prior to any attempt to write data to the 25xx040, the
write enable latch must be set by issuing the WREN
instruction (Figure 3-4). This is done by setting CS
and then clocking out the proper instruction into the
25xx040. After all eight bits of the instruction are transmitted, the CS
enable latch. If the write operation is initiated immediately after the WREN instruction without CS
brought high, the data will not be written to the array
because the write enable latch will not have been
properly set.
Once the write enable latch is set, the user may proceed by setting the CS
followed by the address, and then the data to be written. Keep in mind that the most significant address bit
(A8) is included in the instruction byte. Up to 16 bytes
of data can be sent to the 25xx040 before a write cycle
is necessary. The only restriction is that all of the bytes
must reside in the same page. A page address begins
with XXXX 0000 and ends with XXXX 1111. If the
internal address counter reaches XXXX 1111 and the
clock continues, the counter will roll back to the first
address of the page and overwrite any data in the
page that may have been written.
For the data to be actually written to the array, the CS
must be brought high after the least significant bit (D0)
of the n
brought high at any other time, the write operation will
not be completed. Refer to Figure 3-2 and Figure 3-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 WIP, WEL, BP1, and
BP0 bits (Figure 3-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.
must be brought high to set the write
low, issuing a write instruction,
th
data byte has been clocked in. If CS is
low
being
TABLE 3-1:INSTRUCTION SET
Instruction NameInstruction FormatDescription
READ0000 A
WRITE0000 A
WRDI0000 0100Reset the write enable latch (disable write operations)
WREN0000 0110Set the write enable latch (enable write operations)
RDSR0000 0101Read status register
WRSR0000 0001Write status register
Note: A
DS21204A-page 6Preliminary 1997 Microchip Technology Inc.
is the 9th address bit necessary to fully address 512 bytes.
8
011Read data from memory array beginning at selected address
8
010Write data to memory array beginning at selected address
The 25xx040 contains a write enable latch. See
Table 3-3 for the Write Protect Functionality Matrix.
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 3-4:WRITE ENABLE SEQUENCE
CS
02345671
SCK
SI
SO
01000001
The following is a list of conditions under which the
write enable latch will be reset:
• Power-up
• WRDI instruction successfully executed
• WRSR instruction successfully executed
• WRITE instruction successfully executed
• WP
high impedance
line is low
FIGURE 3-5:WRITE DISABLE SEQUENCE
CS
02345671
SCK
SI
SO
01000001
0
high impedance
DS21204A-page 8Preliminary 1997 Microchip Technology Inc.
25AA040/25LC040/25C040
3.5Read Status Register (RDSR)
The RDSR instruction provides access to the status
register. The status register may be read at any time,
even during a write cycle. The status register is formatted as follows:
76543210
XXXXBP1BP0WELWIP
The Write-In-Process (WIP) bit indicates whether the
25xx040 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 Write Enable Latch (WEL) bit indicates the status
of the write enable latch. 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. This bit is read only.
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 non-volatile.
See Figure 3-6 for RDSR timing sequence
3.6Write Status Register(WRSR)
The WRSR instruction allows the user 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
illustrated in Table 3-2.
DS21204A-page 10Preliminary 1997 Microchip Technology Inc.
25AA040/25LC040/25C040
25AA040/25LC040/25C040 PRODUCT IDENTIFICATION SYSTEM
To order or obtain information, e.g., on pricing or delivery, refer to the factory or the listed sales office.
25xx040 — /P
P=Plastic DIP (300 mil Body), 8-lead
Package:
SN=Plastic SOIC (150 mil Body), 8-lead
ST=TSSOP, 8-lead
Sales and Support
Temperature
Range:
Devices:
Blank=0°C to +70°C
I=–40°C to +85°C
E=–40°C to +125°C
25AA040 4096 bit 1.8V SPI Serial EEPROM
25AA040T 4096 bit 1.8V SPI Serial EEPROM Tape and Reel
25AA040X 4096 bit 1.8V SPI Serial EEPROM
in alternate pinout (ST only)
25AA040XT 4096 bit 1.8V SPI Serial EEPROM
in alternate pinout Tape and Reel (ST only)
25LC040 4096 bit 2.5V SPI Serial EEPROM
25LC040T 4096 bit 2.5V SPI Serial EEPROM Tape and Reel
25LC040X 4096 bit 2.5V SPI Serial EEPROM
in alternate pinout (ST only)
25LC040XT 4096 bit 2.5V SPI Serial EEPROM
in alternate pinout Tape and Reel (ST only)
25C040 4096 bit 5.0V SPI Serial EEPROM
25C040T 4096 bit 5.0V SPI Serial EEPROM Tape and Reel
25C040X 4096 bit 5.0V SPI Serial EEPROM
in alternate pinout (ST only)
25C040XT 4096 bit 5.0V SPI Serial EEPROM
in alternate pinout Tape and Reel (ST only)
Data Sheets
Products supported by a preliminary Data Sheet may have an errata sheet describing minor operational differences and recommended workarounds. To determine if an errata sheet exists for a particular device, please contact one of the following:
1. Your local Microchip sales office.
2. The Microchip Corporate Literature Center U.S. FAX: (602) 786-7277.
3. The Microchip’s Bulletin Board, via your local CompuServe number (CompuServe membership NOT required).
1997 Microchip Technology Inc. Preliminary DS21204A-page 11
W
ORLDWIDE
AMERICAS
Corporate Office
Microchip Technology Inc.
2355 West Chandler Blvd.
Chandler, AZ 85224-6199
Tel: 602-786-7200 Fax: 602-786-7277
Technical Support:
Web:
http://www.microchip.com
Atlanta
Microchip Technology Inc.
500 Sugar Mill Road, Suite 200B
Atlanta, GA 30350
Tel: 770-640-0034 Fax: 770-640-0307
Boston
Microchip Technology Inc.
5 Mount Royal Avenue
Marlborough, MA 01752
Tel: 508-480-9990 Fax: 508-480-8575
Chicago
Microchip Technology Inc.
333 Pierce Road, Suite 180
Itasca, IL 60143
Tel: 630-285-0071 Fax: 630-285-0075
Dallas
Microchip Technology Inc.
14651 Dallas Parkway, Suite 816
Dallas, TX 75240-8809
Tel: 972-991-7177 Fax: 972-991-8588
Dayton
Microchip Technology Inc.
Two Prestige Place, Suite 150
Miamisburg, OH 45342
Tel: 937-291-1654 Fax: 937-291-9175
Los Angeles
Microchip Technology Inc.
18201 Von Karman, Suite 1090
Irvine, CA 92612
Tel: 714-263-1888 Fax: 714-263-1338
New York
Microchip Technology Inc.
150 Motor Parkway, Suite 416
Hauppauge, NY 11788
Tel: 516-273-5305 Fax: 516-273-5335
San Jose
Microchip Technology Inc.
2107 North First Street, Suite 590
San Jose, CA 95131
Tel: 408-436-7950 Fax: 408-436-7955
Toronto
Microchip Technology Inc.
5925 Airport Road, Suite 200
Mississauga, Ontario L4V 1W1, Canada
Tel: 905-405-6279 Fax: 905-405-6253
602 786-7627
S
ALES
& S
ASIA/PACIFIC
Hong Kong
Microchip Asia Pacific
RM 3801B, Tower Two
Metroplaza
223 Hing Fong Road
Kwai Fong, N.T., Hong Kong
Tel: 852-2-401-1200 Fax: 852-2-401-3431
India
Microchip Technology India
No. 6, Legacy, Convent Road
Bangalore 560 025, India
Tel: 91-80-229-0061 Fax: 91-80-229-0062
Korea
Microchip Technology Korea
168-1, Youngbo Bldg. 3 Floor
Samsung-Dong, Kangnam-Ku
Seoul, Korea
Tel: 82-2-554-7200 Fax: 82-2-558-5934
Arizona Microchip Technology Ltd.
Unit 6, The Courtyard
Meadow Bank, Furlong Road
Bourne End, Buckinghamshire SL8 5AJ
Tel: 44-1628-851077 Fax: 44-1628-850259
France
Arizona Microchip Technology SARL
Zone Industrielle de la Bonde
2 Rue du Buisson aux Fraises
91300 Massy, France
Tel: 33-1-69-53-63-20 Fax: 33-1-69-30-90-79
Information contained in this publication regarding device applications and the like is intended for suggestion only and may be superseded by updates. No representation or
warranty is given and no liability is assumed by Microchip Technology Incorporated with respect to the accuracy or use of such information, or infringement of patents or other
intellectual property rights arising from such use or otherwise. Use of Microchip’s products as critical components in life support systems is not authorized except with express
written approval by Microchip. No licenses are conveyed, implicitly or otherwise, under any intellectual property rights. The Microchip logo and name are registered trademarks
of Microchip Technology Inc. in the U.S.A. and other countries. All rights reserved. All other trademarks mentioned herein are the property of their respective companies.