Datasheet
495
SAM9263 [DATASHEET]
Atmel-6249N-ATARM-SAM9263-Datasheet_14-Mar-16
32.8.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)
1. Program IADRSZ = 1,
2. Program DADR with 1 1 1 1 0 b1 b2 (b1 is the MSB of the 10-bit address, b2, etc.)
3. Program TWI_IADR with b3 b4 b5 b6 b7 b8 b9 b10 (b10 is the LSB of the 10-bit address)
Figure 32-12 below shows a byte write to an Atmel AT24LC512 EEPROM. This demonstrates the use of internal
addresses to access the device.
Figure 32-12. Internal Address Usage
32.8.6 Read/Write Flowcharts
The following flowcharts shown in Figure 32-13, Figure 32-14 on page 497, Figure 32-15 on page 498, Figure 32-
16 on page 499, Figure 32-17 on page 500 and Figure 32-18 on page 501 give examples for read and write
operations. A polling or interrupt method can be used to check the status bits. The interrupt method requires that
the interrupt enable register (TWI_IER) be configured first.
S
T
A
R
T
M
S
B
Device
Address
0
L
S
B
R
/
W
A
C
K
M
S
B
W
R
I
T
E
A
C
K
A
C
K
L
S
B
A
C
K
FIRST
WORD ADDRESS
SECOND
WORD ADDRESS
DATA
S
T
O
P