beautypg.com

Program and erase commands, 1 buffer write – Rainbow Electronics AT45DB021E User Manual

Page 10

background image

10

AT45DB021E [PRELIMINARY DATASHEET]

8789B–DFLASH–11/2012

6.

Program and Erase Commands

6.1

Buffer Write

Utilizing the Buffer Write command allows data clocked in from the SI pin to be written directly into the data buffer.

To load data into the Buffer using the standard DataFlash buffer size (264 bytes), an opcode of 84h must be clocked into
the device followed by three address bytes comprised of 15 dummy bits and nine buffer address bits (BFA8 - BFA0). The
nine buffer address bits specify the first byte in the Buffer to be written.

To load data into the Buffer using the binary buffer size (256 bytes), an opcode of 84h must be clocked into the device
followed by 16 dummy bits and eight address bits (A7 - A0). The eight address bits specify the first byte in the Buffer to
be written.

After the last address byte has been clocked into the device, data can then be clocked in on subsequent clock cycles. 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 loaded into the Buffer until a low-to-high transition is detected on the CS pin.

6.2

Buffer to Main Memory Page Program with Built-In Erase

The Buffer to Main Memory Page Program with Built-In Erase command allows data that is stored in the Buffer to be
written into an erased or programmed page in the main memory array. It is not necessary to pre-erase the page in main
memory to be written because this command will automatically erase the selected page prior to the program cycle.

To perform a Buffer to Main Memory Page Program with Built-In Erase using the standard DataFlash page size
(264 bytes), an opcode of 83h must be clocked into the device followed by three address bytes comprised of five dummy
bits,10 page address bits (PA9 - PA0) that specify the page in the main memory to be written, and nine dummy bits.

To perform a Buffer to Main Memory Page Program with Built-In Erase using the binary page size (256 bytes), an opcode
of 83h must be clocked into the device followed by three address bytes comprised of six dummy bits, 10 page address
bits (A17 - A8) that specify the page in the main memory to be written, and eight dummy bits.

When a low-to-high transition occurs on the CS pin, the device will first erase the selected page in main memory
(the erased state is a Logic 1) and then program the data stored in the Buffer into that same page in main memory. Both
the erasing and the programming of the page are internally self-timed and should take place in a maximum time of t

EP

.

During this time, the RDY/BUSY

bit in the Status Register will indicate that the device is busy.

The device also incorporates intelligent erase and program algorithms that can detect when a byte location fails to erase
or program properly. If an erase or programming error arises, it will be indicated by the EPE bit in the Status Register.

6.3

Buffer to Main Memory Page Program without Built-In Erase

The Buffer to Main Memory Page Program without Built-In Erase command allows data that is stored in the Buffer to be
written into a pre-erased page in the main memory array. It is necessary that the page in main memory to be written be
previously erased in order to avoid programming errors.

To perform a Buffer to Main Memory Page Program without Built-In Erase using the standard DataFlash page size
(264 bytes), an opcode of 88h must be clocked into the device followed by three address bytes comprised of five dummy
bits,10 page address bits (PA9 - PA0) that specify the page in the main memory to be written, and nine dummy bits.

To perform a Buffer to Main Memory Page Program using the binary page size (256 bytes), an opcode 88h must be
clocked into the device followed by three address bytes comprised of six dummy bits, 10 page address bits (A17 - A8)
that specify the page in the main memory to be written, and eight dummy bits.

When a low-to-high transition occurs on the CS pin, the device will program the data stored in the Buffer into the
specified page in the main memory. The page in main memory that is being programmed must have been previously
erased using one of the erase commands (Page Erase, Block Erase, Sector Erase, or Chip Erase). The programming of
the page is internally self-timed and should take place in a maximum time of t

P

. During this time, the RDY/BUSY

bit in the

Status Register will indicate that the device is busy.