English
Language : 

SAM7X128_14 Datasheet, PDF (274/662 Pages) ATMEL Corporation – ARM-based Flash MCU
29.5.5 Internal Address
The TWI interface can perform various transfer formats: Transfers with 7-bit slave address devices and 10-bit slave
address devices.
29.5.5.1 7-bit Slave Addressing
When Addressing 7-bit slave devices, the internal address bytes are used to perform random address (read or write)
accesses to reach one or more data bytes, within a memory page location in a serial memory, for example. When
performing read operations with an internal address, the TWI performs a write operation to set the internal address into
the slave device, and then switch to Master Receiver mode. Note that the second start condition (after sending the IADR)
is sometimes called “repeated start” (Sr) in I2C fully-compatible devices. See Figure 29-10, Figure 29-11 and Figure 29-
12.
The three internal address bytes are configurable through the Master Mode register (TWI_MMR).
If the slave device supports only a 7-bit address, i.e. no internal address, IADRSZ must be set to 0.
In the figures below the following abbreviations are used:
S
Start
P
Stop
 W Write
R
Read
A
Acknowledge
N
Not Acknowledge
 DADR Device Address
 IADR Internal Address
Figure 29-10. Master Write with One, Two or Three Bytes Internal Address and One Data Byte
Three bytes internal address
TWD
S
DADR
W
A IADR(23:16) A IADR(15:8) A
IADR(7:0)
A
Two bytes internal address
TWD
S
DADR
W
A IADR(15:8) A
IADR(7:0)
A
DATA
A
One byte internal address
TWD
S
DADR
W
A
IADR(7:0)
A
DATA
A
P
DATA
P
A
P
Figure 29-11. Master Read with One, Two or Three Bytes Internal Address and One Data Byte
Three bytes internal address
TWD S
DADR
W
A IADR(23:16) A IADR(15:8) A IADR(7:0) A
S
DADR
R
A
Two bytes internal address
TWD S
DADR
W
A IADR(15:8) A
IADR(7:0) A
S
DADR
DATA
N
P
R
A
DATA
NP
One byte internal address
TWD S
DADR
W
A IADR(7:0) A
S DADR R
A
DATA
N
P
29.5.5.2 10-bit Slave Addressing
For a slave address higher than 7 bits, the user must configure the address size (IADRSZ) and set the other slave
address bits in the internal address register (TWI_IADR). The two remaining Internal address bytes, IADR[15:8] and
IADR[23:16] can be used the same as in 7-bit Slave Addressing.
Example: Address a 10-bit device (10-bit device address is b1 b2 b3 b4 b5 b6 b7 b8 b9 b10)
SAM7X Series [DATASHEET]
6120K–ATARM–11-Feb-14
274