6 read-modify-write – Rainbow Electronics AT45DB041E User Manual

Page 12

Advertising
background image

12

AT45DB041E [ADVANCE DATASHEET]

8783B–DFLASH–11/2012

buffer is reached, then the device will wrap around back to the beginning of the buffer. When using the binary page size,
the page and buffer address bits correspond to a 19-bit logical address (A18-A0) in the main memory.

After all data bytes have been clocked into the device, a low-to-high transition on the CS pin will start the program
operation in which the device will program the data stored in Buffer 1 into the main memory array. Only the data bytes
that were clocked into the device will be programmed into the main memory.

Example:

If only two data bytes were clocked into the device, then only two bytes will be programmed into main
memory and the remaining bytes in the memory page will remain in their previous state.

The CS pin must be deasserted on a byte boundary (multiples of eight bits); otherwise, the operation will be aborted and
no data will be programmed. The programming of the data bytes is internally self-timed and should take place in a
maximum time of t

P

(the program time will be a multiple of the t

BP

time depending on the number of bytes being

programmed). During this time, the RDY/BUSY

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

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

6.6

Read-Modify-Write

A completely self-contained read-modify-write operation can be performed to reprogram any number of sequential bytes
in a page in the main memory array without affecting the rest of the bytes in the same page. This command allows the
device to easily emulate an EEPROM by providing a method to modify a single byte or more in the main memory in a
single operation, without the need for pre-erasing the memory or the need for any external RAM buffers. The
Read-Modify-Write command is essentially a combination of the Main Memory Page to Buffer Transfer, Buffer Write, and
Buffer to Main Memory Page Program with Built-in Erase commands.
To perform a Read-Modify-Write using the standard DataFlash page size (264 bytes), an opcode of 58h for Buffer 1 or
59h for Buffer 2 must be clocked into the device followed by three address bytes comprised of four dummy bits, 11 page
address bits (PA10 - PA0) that specify the page in the main memory to be written, and nine byte address bits (BA8 - BA0)
that designate the starting byte address within the page to reprogram.
To perform a Read-Modify-Write using the binary page size (256 bytes), an opcode of 58h for Buffer 1 or 59h for Buffer 2
must be clocked into the device followed by three address bytes comprised of three dummy bits, 11 page address bits
(A18 - A8) that specify the page in the main memory to be written, and eight byte address bits (A7 - A0) designate the
starting byte address within the page to reprogram.
After the address bytes have been clocked in, any number of sequential data bytes from one to 256/264 bytes can be
clocked into the device. If the end of the buffer is reached when clocking in the data, then the device will wrap around
back to the beginning of the buffer. After all data bytes have been clocked into the device, a low-to-high transition on the
CS pin will start the self-contained, internal read-modify-write operation. Only the data bytes that were clocked into the
device will be reprogrammed in the main memory.

Example:

If only one data byte was clocked into the device, then only one byte in main memory will be reprogrammed
and the remaining bytes in the main memory page will remain in their previous state.

The CS pin must be deasserted on a byte boundary (multiples of eight bits); otherwise, the operation will be aborted and
no data will be programmed. The reprogramming of the data bytes 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.

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

Note:

The Read-Modify-Write command uses the same opcodes as the Auto Page Rewrite command. If no data
bytes are clocked into the device, then the device will perform an Auto Page Rewrite operation. See the
Auto Page Rewrite command description on

page 27

for more details.

Advertising