
A similar procedure can be used to write a single
block:
1.
The
SetPage command is sent, followed by
the page number where the data should be
written
2.
The
IncBlock command is sent as many times
as the block number inside the page (for ex-
ample: to address the block 3 the
IncBlock
must be sent 3 times)
3.
The
WriteBlock command is sent followed by
the 32 data bytes to be written.
4.
After the 32th byte is sent, the device holds
the SCL line low until all the data are not
stored in the memory (about 4.5 ms: 2 ms for
erasing and 2.5 for writing: the same time for
a single byte)
The procedures described previously can be
repeated as many time as needed, without exiting
from Programming Mode or re-sending the Slave
Address again.
The commands ByteErase and BlockErase, used
instead of ByteWrite and BlockWrite, erase (put all
bit to 0) the specified memory location or block.
4.2.4 Option Bytes Programming. The
Option
Byte addresses cannot be accessed with a
sequential procedure like the one described in
Actually,
the
pointers
are
automatically incremented up to the last block or
address in page 31. A further increment sets all the
pointers to 0.
The Option Byte addresses (located at page 48,
block 0, addresses 0-7) must be accessed with a
direct addressing procedure as the one described
If the Fast Programming procedure is used, it must
be followed by a Random Block Writing procedure
to program the Option Bytes. The other 24 bytes of
the block can be written with dummy values or user
values. The blocks 0, 1, 2 and 3 of Page 48 can be
Figure 4.2 Programming Procedures
Fast Programming Procedure
Random Byte Writing Procedure
Random Block Writing Procedure
Option Byte Writing Procedure
S=Start, P=Stop, A=Acknowledge, NA=Non-acknowledge
From Slave to Master
From Master to Slave
S 10100000
A
00000000
A
GlobalErase
A
FastBlockWrite
A
Data0
A
.....
Data31
A
IncBlock
A
FastBlockWrite
A
.....
Data31
A
.....
Data31
AP
.....
SetPage
A
Page Address
A
ByteWrite
A
Byte Address
AData
A
Command
.....
SetPage
A
Page Address
A
IncBlock
A
.....
IncBlock
A
BlockWrite
A
Data0
A
.....
Data31
A
Command
.....
SetPage
A
00110000
A
WriteBlock
A
Option Byte 0
A
.....
Option Byte 7
A
.....
Dummy 0
A
.....
Dummy 23
AP