
Figure 4.3 Reading and Erasing Procedures
4.3 Memory Verify
To verify the memory contents or just to read part
of data stored in memory, the
ByteRead and the
ReadData command can be used. The first
instruction needs the specification of the address;
the second one allows the sequential reading of
consecutive memory locations.
Since the device is “Slave” for the I2C protocol,
after receiving a command for reading, it must be
configured as Slave Transmitter to send the data.
In order to do so, the Slave Address (1010000)
must be sent again with the R/W byte set to 1, as
stated by the communication protocol.
4.3.1 Fast read procedure. The memory can be
read sequentially by using the following procedure:
1.
The Programming mode is entered with the
2.
The pointers address the memory location 0
3.
The
ReadData command is sent and the de-
vice acknowledges it.
4.
The Master generates a Stop condition fol-
lowed by a Start condition
5.
The Slave Address with the R/W byte set to 1
(10100001) is sent. The device receives the
Slave Address and acknowledges it.
6.
The device sends the data to be read in the
serial data line SDA. The current absolute ad-
dress is post-incremented.
7.
The Master device send the acknowledge to
read the contents of the next location.
8.
The sequence restarts from point 6 until the
master not acknowledge the data read and
generates a Stop condition, in order to stop
the reading sequence.
Remark: for the same reasons explained in
this procedure: they can be read with a direct
addressing procedure as the one explained in the
next section.
Fast Reading Procedure
Random Byte Reading Procedure
Byte Erasing Procedure
Block Erasing Procedure
(*) Block address is specified by the 3 most significative bits of the whole given address (less significative bits are don’t care)
S=Start, P=Stop, A=Acknowledge, NA=Non-acknowledge
From Slave to Master
From Master to Slave
S 10100000
A
00000000
A
ReadData
A
P
S 10100001
A
Data read
A
.....
ReadData
A
Data read
A
.....
Data read NA
P
.....
SetPage
A
Page Address
A
ByteRead
A
Byte Address
A
P
S 10100001
A
.....
Data read NA
P
S 10100000
A
Command
.....
SetPage
A
Page Address
A
ByteErase
A
Byte Address
A
Command
.....
SetPage
A
Page Address
A
BlockErase
A
Block Address (*)
A
Command .....