– Single Cycle Reprogram (Erase and Program)
– 1024 Pages (264 Bytes/Page) Main Memory
•
Two 264-Byte SRAM Data Buffers – Allows Receiving of Data
while Reprogramming of Non-Volatile Memory
•
Internal Program and Control Timer
•
Fast Page Program Time – 7 ms Typical
µµµµ
•
120
s Typical Page to Buffer Transfer Time
•
Low Power Dissipation
– 4 mA Active Read Current Typical
µµµµ
–5
A CMOS Standby Current Typical
•
5 MHz Max Clock Frequency
•
Hardware Data Protection Feature
•
Serial Peripheral Interface (SPI) Compatible – Modes 0 and 3
•
CMOS and TTL Compatible Inputs and Outputs
•
Commercial and Industrial Temperature Ranges
2-Megabit
2.7-volt Only
Serial
DataFlash
®
Description
The AT45DB021 is a 2.7-volt only, serial interface Flash memory suitable for in-system reprogramming. Its 2,162,688 bits of memory are organized as 1024 pages of
264-bytes each. In addition to the main me mory, the AT45DB021 also contains two
SRAM data buffers of 264-bytes each. The buffers allow receiving of data while a
page in the main memory is being reprogrammed. Unlike conventional Flash memories that are accessed randomly with multiple address lines and a parallel interface,
the DataFlash uses a serial interface to sequentially access its data. The simple serial
interface facilitates hardware layout, increases system reliability, minimizes switching
Note: PLCC package pins 16
and 17 are DON’T CONNECT.
5
6
SI
7
SO
8
NC
9
NC
10
NC
11
NC
12
NC
13
NC
PLCC
CSNCNC
GND
VCCNCNC
432
1
323130
14151617181920
NCNCDCNCNCNCNC
29
28
27
26
25
24
23
22
21
WP
RESET
RDY/BUSY
NC
NC
NC
NC
NC
NC
AT45DB021
RDY/BUSY
RESET
VCC
GND
SCK
TSOP Top View
Type 1
1
2
3
WP
4
NC
5
NC
6
NC
7
8
9
NC
10
NC
11
NC
12
NC
13
CS
14
15
SI
16
SO
32
NC
31
NC
30
NC
29
NC
28
NC
27
NC
26
NC
25
NC
24
NC
23
NC
22
NC
21
NC
20
NC
19
NC
18
NC
17
NC
GND
SCK
SOIC
1
28
2
NC
3
NC
4
CS
5
6
SI
7
SO
8
NC
9
NC
10
NC
11
NC
12
NC
13
NC
14
NC
VCC
27
NC
26
NC
25
WP
24
RESET
23
RDY/BUSY
22
NC
21
NC
20
NC
19
NC
18
NC
17
NC
16
NC
15
NC
Rev. 0868B–07/98
1
noise, and reduces p ac ka ge si ze and active pin count. The
device is optimized for use i n many comm ercial and i ndustrial applications where high density, low pin count, low
voltage, and low power are essential. Typical applications
for the DataFlash are digital voice storage, image storage,
and data storage. The device operates at clock frequencies
up to 5 MHz with a typic al act ive read curr ent co nsump tion
of 4 mA.
To allow for simple in-system reprogrammability, the
AT45DB021 does not require high input voltages for pro-
Block Diagram
gramming. The devi ce operate s from a s ingle po wer supply, 2.7V to 3.6V, for both the program and read
operations. The AT45DB021 is enabled through the chip
select pin (CS
consisting of the Serial Input (SI), Serial Output (SO), and
the Serial Clock (SCK).
All programming cycles are self-timed, and no separate
erase cycle is required before programming.
) and accessed via a three-wire interface
WP
PAGE (264 BYTES)
SCK
CS
RESET
V
CC
GND
RDY/BUSY
Device Operation
The device operation is controlled by instructions from the
host processor. The l is t o f in st ru cti on s a nd thei r as so ci ated
opcodes are containe d in T ables 1 an d 2. A v alid instr uction starts with the falling edge of CS
priate 8-bit opcode an d the desi red buffer or main memor y
address location. While the CS
pin controls the loading of the opcode and the desired
buffer or main memory address location through the SI
(serial input) pin. All instructions, addresses, and data are
transferred with the most significant bit (MSB) first.
Read
By specifying the appropriate opcode, data can be read
from the main memory or from either one of the two data
buffers.
MAIN MEMORY PAGE READ:
the user to read data directly from any one of the 1024
pages in the main memory, bypassing both of the data buffers and leaving the contents of the buffers unchanged. To
start a page read, the 8-bit opcode, 52H, is followed by 24
address bits and 32 don’t care bits . In the AT45DB 021, the
followed by the appro-
pin is low, toggling the SCK
A main memory read allows
FLASH MEMORY ARRAY
BUFFER 2 (264 BYTES)BUFFER 1 (264 BYTES)
I/O INTERFACE
SOSI
first five address bi ts are reserved for lar ger density
devices (see Notes on page 8), the next 10 address bits
(PA9-PA0) specify the page address, and the next nine
address bits (BA8-BA0) specify the starting byte address
within the page. The 32 don’t care bits which follow the 24
address bits are sent to initialize the read operation. Following the 32 don’t care bits, additional pulses on SCK
result in serial data being output on the SO (serial output)
pin. The CS
opcode, the address bits, and the reading of data. When
the end of a page in main memory is reached during a main
memory page read, the device will continue reading at the
beginning of the same pag e. A l ow to hig h trans i tion on th e
pin will terminate the read operation and tri-state the
CS
SO pin.
BUFFER READ:
two buffers, usin g di fferen t o pc ode s to s pe cify wh ic h bu ffer
to read from. An opcode of 54H is used to read data from
buffer 1, and an opcode of 56H is used to read data from
buffer 2. To perfo rm a buffer read, the eight bits o f the
pin must remain low during the loading of the
Data can be re ad from ei ther one of the
2
AT45DB021
AT45DB021
opcode must be followed by 15 don’t care bits, nine
address bits, and eight don't care bits. Since the buffer size
is 264-bytes, nine address bits (BFA8-BFA0) are required
to specify the first byte of data to b e read from th e buffer.
The CS
pin must remain low during the loading of the
opcode, the address bits, t he don ’t care bi ts, an d the reading of data. When the end of a buffer is reached, the device
will continue reading back at the beginning of the buffer. A
low to high transition on the CS
pin will terminate the read
operation and tri-state the SO pin.
MAIN MEMORY PAGE TO BUFFER TRANSFER:
A page
of data can be transferred from the main memory to either
buffer 1 or buffer 2. An 8-bit opcode, 53H for buffer 1 and
55H for buffer 2, is followed by the five reserved bits, 10
address bits (PA9-PA0) which specify the page in main
memory that is to be transferred, and nine don’t care bits.
The CS
pin must be low while to ggling the SCK pin to loa d
the opcode, the address bit s, and the don ’t care bits from
the SI pin. The transfer of the page of data from the main
memory to the buffer will begin when the CS
pin transitions
from a low to a high state. During the transfer of a page of
data (t
), the status register can be read to determin e
XFR
whether the transfer has been completed or not.
MAIN MEMORY PAGE TO BUFFER COMPARE:
A page of
data in main memory can be compared to the data in buffer
1 or buffer 2. An 8-bit opcode , 60 H for bu ffer 1 and 61H for
buffer 2, is followed by 24 address bits consisting of the five
reserved bits, 10 ad dres s b its (P A9- P A0 ) whi ch sp ec ify the
page in the main memory that is to be compared to the
buffer, and nine don't care bits. The loading of the opcode
and the address bits is the same as described previously.
The CS
pin must be low while to ggling the SCK pin to loa d
the opcode, the address bits, and the don't care bits from
the SI pin. On the low to high transi tion of the CS
pin, the
264 bytes in the selected main memory page will be compared with the 264 b ytes in buf fer 1 or buffe r 2. During th is
time (t
), the status register will indicate that the part is
XFR
busy. On co mplet ion o f t he co mpar e op era tion, bit 6 o f th e
status register is updated with the result of the compare.
Program
BUFFER WRITE:
into either buffer 1 or bu ffer 2. To load data into ei ther
buffer, an 8-bit opcode, 84H for buffer 1 or 87H for buffer 2,
is followed by 15 don't care bits and nine address bits
(BFA8-BFA0). The nine address bits specify the first byte in
the buffer to be written. The data is entered following the
address bits. If the end of the data buffer is reached, the
device will wrap around back to the beginning of the buffer.
Data will continue to be l oaded i nto the b uffer unti l a low t o
high transition is detected on the CS
BUFFER TO MAIN MEMORY PAGE PROGRAM WITH
BUILT-IN ERASE:
2 can be programmed into the main memory. An 8-bit
Data can be shif ted in from the SI pi n
pin.
Data written into either buff er 1 or bu ffer
opcode, 83H for buffer 1 or 86H for buffer 2, is f ollowed by
the five reserved bits, 10 address bits (PA9-PA0) that specify the page in the main memory to be written, and nine
additional don't care bits. When a low to high transition
occurs on the CS
pin, the part will first erase the selec ted
page in main memory to all 1s and then program the data
stored in the buffer in to the specified page i n the main
memory. Both th e erase an d the pr ogrammi ng of the p age
are internally self timed and should take place in a maximum time of t
. During this time, the status register will
EP
indicate that the part is busy.
BUFFER TO MAIN MEMORY PAGE PROGRAM WITHOUT BUILT-IN ERASE:
A previously erased page within
main memory can be p rogrammed with the conten ts of
either buffer 1 or buffer 2. An 8-bit opcode, 88H for buffer 1
or 89H for buffer 2, is fol lowed by th e five rese rved bit s, 10
address bits (PA9-PA0) that specify the page in the main
memory to be writ ten, an d nine addi tional don’t c are bits.
When a low to high transition occurs on the CS
pin, the part
will program the data stored in the buffer into the specified
page in the main memory. It is necessary that the page in
main memory that is being programmed has been previously programmed to all 1s (erased state). The programming of the page is internally se lf timed and should tak e
place in a maximum time of t
. During this tim e, the s tatus
P
register will indicate that the part is busy.
MAIN MEMORY PAGE PROGRAM:
This operation is a
combination of the Buffer Write and Buffer to Main Memory
Page Program with Built-In Erase operations . Data is fi rst
shifted into buffer 1 or buffer 2 from the SI pin and then programmed into a specified page in the main memory. An 8bit opcode, 82H f or buff er 1 or 85 H for b uffer 2, is foll owed
by the five reserved bits and 19 address bits. The 10 most
significant address bits (PA9-PA0) select the page in the
main memory where data is to be written, and the next nine
address bits (BFA8-BFA0) select the first byte in the bu ffer
to be written. After all address bits are shifted in, the part
will take data from the SI pin and st ore it in one of the da ta
buffers. If the end of the b uffer i s reache d, the de vice wil l
wrap around back to the beginning of the buffer. W hen
there is a low to high transition on the CS
pin, the part will
first erase the selected page in main memory to all 1s and
then program the data stored in the buffer into the specified
page in the main memory. Both the erase and the programming of the page are internally self timed and should take
place in a maximum of tim e t
. During this time, the status
EP
register will indicate that the part is busy.
AUTO PAGE REWRITE:
This mode is only needed if mul tiple bytes within a page or m ultiple pa ges of dat a are mod ified in a random fashion. This mode is a combination of two
operations: Main Memory Page to Buffer Transfer and
Buffer to Main Memory Page Program with Built-In Erase.
A page of data i s fir st tran sferred from the mai n me mory to
buffer 1 or buffer 2, and then the same data (from buffer 1
3
or buffer 2) is p rogrammed bac k into its original pag e of
main memory. An 8- bit op code, 5 8H for buffer 1 or 59H for
buffer 2, is followed by the five reserved bits, 10 address
bits (PA9-PA0) that s pe cify the p age in mai n me mor y to b e
rewritten, and nine additional don't care bits. When a low to
high transition occurs on the CS
fer data from the page in main memory to a buffer and then
program the data from the buffer back into same page of
main memory. The operation is inter nally self- timed and
should take place in a maximum time of t
time, the status register will indicate that the part is busy.
If the main memory is programmed or reprogrammed
sequentially page by page, then the programming algorithm shown in Figure 1 is recommended. Other wise, if
multiple bytes in a page or sever al pages are progr ammed
randomly in the main memory, then the prog ramming algorithm shown in Figure 2 is recommended.
STATUS REGISTER:
determine the device’s ready/busy status, the result of a
Main Memory Page to Buffer Compa re operation, or the
device density. To read the status register, an opcode of
57H must be loaded int o th e de vi c e. A fter the last bit of the
opcode is shifted in, the eight bits of the status register,
starting with the MSB (bit 7), will be shifted out on the SO
pin during the next eight clock cy cles . The five most-significant bits of the status register will contain devic e information, while the remaining three least-significant bits are
reserved for future use and will have undefined values.
After bit 0 of the status register has been shifted out, the
sequence will rep eat itse lf (a s lo ng as CS
SCK is being toggled ) startin g again with bit 7. The data i n
the status register is constantly updated, so each repeating
sequence will output new data.
Ready/busy status is indicated using bit 7 of the status register. If bit 7 is a 1 , the n th e dev i ce is not bus y a nd i s ready
to accept the next comman d. If bit 7 i s a 0, then the devic e
is in a busy state. The user can continuously poll bit 7 of the
status register by stopping SCK once bit 7 has been output.
The status of bit 7 will continue to be outpu t on the SO pin,
and once the device is no longer busy, the state of SO will
change from 0 to 1. There are six operations which can
cause the device to be in a busy s ta te: Main Memory Pag e
to Buffer Transfer, Main Memory Page to Buffer Compare,
Buffer to Main Memory Page Program with Built-In Erase,
Buffer to Main Memory Page Program without Built-In
Erase, Main Memory Page Program, and Auto Page
Rewrite.
The result of the mos t recent Ma in Memor y Page to B uffer
Compare opera tion is indic ated using bi t 6 of the status
The status register can be used to
pin, the part will first trans-
. During this
EP
remains low an d
register. If bit 6 is a 0, then the data in the main memory
page matches the data in the buffer. If bit 6 is a 1, then at
least one bit of the data in the main memory page does not
match the data in the buffer.
The device dens it y is ind ic ate d us ing b its 5 , 4, and 3 of th e
status register. For the AT45DB021, the three bits ar e 0, 1,
and 0. The decimal value of these three binary bits does
not equate to th e dev ice d ensi ty; th e thre e bit s repr ese nt a
combinational code r elating to d iffering den sities of Ser ial
DataFlash devices, allowing a total of eight different density
configurations.
Read/Program Mode Summary
The modes lis ted abo ve can b e sepa rated into tw o grou ps
— modes which make use of the flash memory array
(Group A) and modes which do no t make use of the flas h
memory array (Group B).
Group A modes consist of:
1. Main memory page read
2. Main memory page to buffer 1 (or 2) transfer
3. Main memory page to buffer 1 (or 2) compare
4. Buffer 1 (or 2) to main memory page program with
built-in erase
5. Buffer 1 (or 2) to main memory page program with-
out built-in erase
6. Main memory page program
7. Auto page rewrite
Group B modes consist of:
1. Buffer 1 (or 2) read
2. Buffer 1 (or 2) write
3. Status read
If a Group A mode is in pro gress ( not full y com pleted) then
another mode in Group A should not be started. However,
during this time in which a Group A mode is in progress,
modes in Group B can be started.
This gives the S erial DataFlash the ability to virtua lly
accommodate a co ntinuous data stre am. While data is
being programmed into main memory from buffer 1, data
can be loaded into buff er 2 (o r vice v ersa) . See applica tio n
note AN-4 (“Using Atmel’s Serial DataFlash”) for more
details.
HARDWARE PAGE WRITE PROTECT:
held low, the first 256 pages of the main memory cannot be
reprogrammed. The only way to reprogram the first 256
pages is to first dri ve the prot ect pin high and then us e the
program commands previously mentioned.
If the WP
pin is
Status Register Format
Bit 7Bit 6Bit 5Bit 4Bit 3Bit 2Bit 1Bit 0
RDY/BUSY
4
COMP010XXX
AT45DB021
AT45DB021
RESET
:
A low state on the reset pin (RESET
) will terminate
the operation in progress and reset the internal state
machine to an idle state. The device will remain in the reset
condition as long as a low level is pr esent on the RE SET
pin. Normal operation can resume once the RESET pin is
brought back to a high level.
The device also in corporates an internal power -on reset
circuit; therefore, there are no restrictions on the RESET
pin during power-on sequences.
READY/BUSY
:
This open dra in output pin will be dri ven
low when the device is busy in an internally self-timed operation. This pin, which is normally in a high state (through an
external pull-up resistor), will be pulled low during program-
Absolute Maximum Ratings*
Temperature Under Bias................................-55°C to +125°C
Storage Temperature..................................... -65°C to +150°C
All Input Voltages
(including NC Pins)
with Respect to Ground...................................-0.6V to +6.25V
All Output Voltages
with Respect to Ground.............................-0.6V to V
+ 0.6V
CC
ming operations, compare operations, and during page-tobuffer transfers.
The busy status indic at es that the Flas h m emo ry a rray an d
one of the buffers cannot be accessed; read and write
operations to the other buffer can still be performed.
Power On/Reset State
When power is first applied to the device, o r w hen re co ve ring from a reset conditio n, the device will defau lt to SPI
mode 3. In addition, the SO pin will be in a high im peda nc e
state, and a high to low transition on the CS
required to start a valid instruction. The SPI mode will be
automatically select ed on ever y falling ed ge of CS
pling the inactive clock state.
*NOTICE:Stresses beyond those listed under “Absolute
Maximum Ratings” may cause permanent damage to the dev ice . This is a s tress rating only an d
functional oper ation of the de vi ce at t hes e or any
other conditions beyond those indicated in the
operational sections of this specification is not
implied. Exposure to absolute maximum rating
conditions f or e xtended periods ma y af fect de vice
reliability .
pin will be
by sam-
DC and AC Operating Range
AT45DB021
Operating Temperature (Case)
V
Power S upply
CC
Note:1. After power is applied and VCC is at the minimum specified data sheet value, the system should wait 20 ms before an oper-
ational mode is started.
(1)
Com.0°C to 70°C
Ind.-40°C to 85°C
2.7V to 3.6V
5
DC Characteristics
SymbolParameterConditionMinTypMaxUnits
I
SB
Standby CurrentCS, RESET, WP = VIH, all input s at.
515µA
CMOS levels
I
CC1
I
CC2
Active Current, Read Operationf = 5 MHz; I
Active Current, Program/
SCK Low Time80ns
Minimum CS High Time350ns
CS Setup Time350ns
CS Hold Time350ns
CS High to RDY/BUSY Low200ns
Data In Setup Time15ns
Data In Hold Time35ns
Output Hold Time0ns
Output Disa ble Time100ns
Output Valid120ns
Page to Buffer Transfer/Compare Time120250µs
Page Erase and Programming Time1020ms
Page Programming Time714ms
RESET Pulse Width10µs
RESET Recovery Time1µs
Input Test Wavef orms and Measurement Levels
2.4V
AC
DRIVING
LEVELS
0.45V
tR, tF < 20 ns (10% to 90%)
6
AT45DB021
AC
2.0
MEASUREMENT
0.8
LEVEL
Output Test Load
DEVICE
UNDER
TEST
30 pF
Loading...
+ 12 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.