17 of 30 July 17, 2012
Write Mode Sequences in a Non-Write Protected Area
Byte Write
After the Device Select Code and the address byte, the bus master sends one data byte. If the addressed location is write-protected, the device
replies to the data byte with NoAck, and the location is not modified. If, instead, the addressed location is not Write-protected, the device replies with
Ack. The bus master terminates the transfer by generating a Stop condition, as shown in the Write Mode Sequence in a Non-Write Protected Area
figure above.
Page Write
The Page Write mode allows up to 16 bytes to be written in a single Write cycle, provided that they are all located in the same page in the memory:
that is, the most significant memory address bits are the same. If more bytes are sent than will fit up to the end of the page, a condition known as
“roll-over” occurs. This should be avoided, as data starts to be over-written in an implementation dependent fashion.
The bus master sends from 1 to 16 bytes of data, each of which is acknowledged by the device. If the addressed location is write-protected, the
device replies to the data byte with NoAck, and the locations are not modified. After each byte is transferred, the internal byte address counter is incre-
mented. The transfer is terminated by the bus master generating a Stop condition.
Write Cycle Polling Using ACK
During the internal Write cycle, the device disconnects itself from the bus, and writes a copy of the data from its internal latches to the memory
cells. The maximum Write time (t
W)
is shown in the AC Characteristic for TSE2002GB2A1 table, but the typical time is shorter. To make use of this, a
polling sequence can be used by the bus master.
The polling sequence is shown in the following figure:
• Initial condition: a Write cycle is in progress.
• Step 1: the bus master issues a Start condition followed by a Device Select Code (the first byte of the new instruction).
• Step 2: if the device is busy with the internal Write cycle, no Ack will be returned and the bus master goes back to Step 1. If the device has
terminated the internal Write cycle, it responds with an Ack, indicating that the device is ready to receive the second part of the instruction (the
first byte of this instruction having been sent during Step 1).