Datasheet

2010 Microchip Technology Inc. Preliminary DS22266A-page 17
MCP7941X
5.2 EEPROM
5.2.1 EEPROM BYTE WRITE
Following the Start condition from the master, the
control code and the R/W
bit (which is a logic low) are
clocked onto the bus by the master transmitter. This
indicates to the addressed slave receiver that a byte
with a word address will follow after it has generated an
Acknowledge bit during the ninth clock cycle.
Therefore, the next byte transmitted by the master is
the word address and will be written into the Address
Pointer of the MCP7941X. After receiving another
Acknowledge signal from the MCP7941X, the master
device transmits the data word to be written into the
addressed memory location. The MCP7941X
acknowledges again and the master generates a Stop
condition. This initiates the internal write cycle, and,
during this time, the MCP7941X does not generate
Acknowledge signals for EEPROM write commands. If
an attempt is made to write to an address and the
protection is set then the device will acknowledge the
command but no write cycle will occur, no data will be
written, and the device will immediately accept a new
command. After a byte write command, the internal
address counter will point to the address location
following the one that was just written.
5.2.2 EEPROM PAGE WRITE
The write control byte, word address, and the first data
byte are transmitted to the MCP7941X in the same way
as in a byte write. But instead of generating a Stop
condition, the master transmits up to 7 additional bytes,
which are temporarily stored in the on-chip page buffer
and will be written into memory after the master has
transmitted a Stop condition. After receipt of each word,
the three lower Address Pointer bits are internally
incremented by one. If the master should transmit more
than 8 bytes prior to generating the Stop condition, the
address counter will roll over and the data received
previously will be overwritten. As with the byte write
operation, once the Stop condition is received, an
internal write cycle will begin (Figure 5-4).
Note: Page write operations are limited to writing
bytes within a single physical page,
regardless
of the number of bytes actually
being transmitted. Physical page
boundaries start at addresses that are
integer multiples of the page buffer size (or
‘page size’) and end at addresses that are
integer multiples of [page size - 1]. If a
page write command attempts to write
across a physical page boundary, the
result is that the data wraps around to the
beginning of the current page (overwriting
data previously stored there), instead of
being written to the next page as might be
expected. It is therefore necessary for the
application software to prevent page write
operations that would attempt to cross a
page boundary.
Note: Addressing undefined EEPROM locations
will result in the MCP7941X not
acknowledging the address.