14
AT25DF641A [DATASHEET]
8793F–DFLASH–11/2017
8.2 Dual-Input Byte/Page Program
The Dual-Input Byte/Page Program command is similar to the standard Byte/Page Program command and can be used
to program anywhere from a single byte of data up to 256 bytes of data into previously erased memory locations. Unlike
the standard Byte/Page Program command, however, the Dual-Input Byte/Page Program command allows two bits of
data to be clocked into the device on every clock cycle rather than just one.
Note: The internal programming operation of the AT25DF641A occurs on a nibble-wide basis, and all four bits of
the nibble must be in an erased state (Logic 1 state) prior to the programming of any of the four bits. If any
one of the four bits is in the programmed state (Logic 0 state) and an attempt is made to program one of the
other four bits in the nibble from a Logic 1 to a Logic 0, then the contents of the nibble cannot be guaranteed
and may contain erroneous data.
Example 1: A 4KB Block Erase is performed to erase the first 4KB block of memory (all bytes set to FFh). The
application then programs the first byte location with a value of 7Fh (0111 1111). Without erasing the 4KB
block again, the application then attempts to program the same byte location with BFh (1011 1111)
expecting that the resulting byte value stored in memory will be 3Fh (0011 1111). However, because of the
way the AT25DF641A programs bytes internally and because all four bits of the most-significant nibble were
not in the erased state prior to the programming of the BFh value, the most-significant nibble will not contain
the value of 0011b but will instead contain a different value.
Example 2: A 4KB Block Erase is performed to erase the first 4KB block of memory (all bytes set to FFh). The
application then programs the first byte location with a value of 7Fh (0111 1111). Without erasing the 4KB
block again, the application then attempts to program the same byte location with FCh (1111 1100),
expecting that the resulting byte value stored in memory will be 7Ch (0111 1100). The resulting byte value
stored in the memory will indeed be 7Ch because no additional bits in the most-significant nibble were being
programmed from a Logic 1 to a Logic 0, and all four bits in the least-significant nibble were in the erased
state prior to the programming of the 7Ch byte value.
Before the Dual-Input Byte/Page Program command can be started, the Write Enable command must have been
previously issued to the device (see “Write Enable” on page 21) to set the Write Enable Latch (WEL) bit of the Status
Register to a Logical 1 state. To perform a Dual-Input Byte/Page Program command, an A2h opcode must be clocked
into the device followed by the three address bytes denoting the first location of the memory array to begin programming
at. After the address bytes have been clocked in, data can then be clocked into the device two bits at a time on both the
SOI and SI pins.
The data is always input with the MSB of a byte first, and the MSB is always input on the SOI pin. During the first clock
cycle, bit 7 of the first data byte is input on the SOI pin while bit 6 of the same data byte is input on the SI pin. During the
next clock cycle, bits 5 and 4 of the first data byte are input on the SOI and SI pins, respectively. The sequence continues
with each byte of data being input after every four clock cycles. Like the standard Byte/Page Program command, all data
clocked into the device is stored in an internal buffer.
If the starting memory address denoted by A23-A0 does not fall on an even 256-byte page boundary (A7-A0 are
not all 0), then special circumstances regarding which memory locations are to be programmed will apply. In this
situation, any data that is sent to the device that goes beyond the end of the page will wrap around back to the beginning
of the same page. In addition, if more than 256 bytes of data are sent to the device, then only the last 256 bytes sent will
be latched into the internal buffer.
Example: If the starting address denoted by A23-A0 is 0000FEh, and three bytes of data are sent to the device, then
the first two bytes of data will be programmed at addresses 0000FEh and 0000FFh while the last byte of
data will be programmed at address 000000h. The remaining bytes in the page (addresses 000001h
through 0000FDh) will not be programmed and will remain in the erased state (FFh).
When the CS pin is deasserted, the device will program the data stored in the internal buffer into the appropriate memory
array locations based on the starting address specified by A23-A0 and the number of data bytes sent to the device. If
less than 256 bytes of data are sent to the device, then the remaining bytes within the page will not be programmed and
will remain in the erased state (FFh). The programming of the data bytes is internally self-timed and should take place in
a time of tPP or tBP if only programming a single byte.