MTA85XXX
DS40115C-page 56
1995 Microchip Technology Inc.
19.0
READ OPERATION
Read operations are initiated in the same way as write
operations with the exception that the R/W bit of the
slave address is set to. There are three basic types of
read operations:
Current address read
Random read
Sequential read.
19.1
Current Address Read
The EEPROM contains an address counter that
maintains the address of the last word accessed,
internally incremented by one. Therefore, if the
previous access (either a read or write operation) was
to address "n", the next current address read operation
would access data from address "n + 1". Upon receipt
of the slave address with R/W bit set, the EEPROM
issues an acknowledge and transmits the eight-bit data
word. The master will not acknowledge the transfer but
does generate a STOP condition and the EEPROM
discontinues transmission (Figure 19-1). If a current
address read is performed after a Power-Up, the last
address will be read.
19.2
Random Read
Random read operations allow the master to access
any memory location in a random manner. To perform
this type of read operation, first the word address must
be set. This is done by sending the word address to the
EEPROM as part of a write operation. After the word
address is sent, the master generates a START
condition following the acknowledge. This terminates
the write operation, but not before the internal address
pointer is set. Then the master issues the control byte
again but with the R/W bit set to a '1'. The EEPROM will
then issue an acknowledge and transmits the eight-bit
data word. The master will not acknowledge the
transfer but does generate a STOP condition and the
EEPROM discontinues transmission (Figure 19-2).
19.3
Sequential Read
Sequential reads are initiated in the same way as a
random read except that after the EEPROM transmits
the first data byte, the master issues an acknowledge
as opposed to a STOP condition in a random read. This
directs the EEPROM to transmit the next sequentially
addressed 8-bit word (Figure 19-3).
FIGURE 19-1: CURRENT ADDRESS READ
FIGURE 19-2: RANDOM READ
CONTROL
A
C
K
S
T
A
R
T
S
T
O
P
BYTE
DATA n
BUS ACTIVITY
MASTER
SDA LINE
BUS ACTIVITY
A
C
K
N
O
BUS ACTIVITY:
MASTER
SDA LINE
BUS ACTIVITY
CONTROL
BYTE
WORD
ADDRESS (n)
DATA n
A
C
K
S
T
A
R
T
N
O
S
T
A
R
CONTROL
BYTE
A
C
K
A
C
K
A
C
K
SS
T
P
S
T
O
P