223
32059L–AVR32–01/2012
AT32UC3B
The TWI transfers require the slave to acknowledge each received byte. During the acknowl-
edge clock pulse (9th pulse), the master releases the data line (HIGH), enabling the slave to pull
it down in order to generate the acknowledge. The master polls the data line during this clock
pulse and sets the NACK in the status register if the slave does not acknowledge the byte. As
with the other status bits, an interrupt can be generated if enabled in the interrupt enable register
(IER). If the slave acknowledges the byte, the data written in the THR, is then shifted in the inter-
nal shifter and transferred. When an acknowledge is detected, the TXRDY bit is set until a new
write in the THR. When no more data is written into the THR, the master generates a stop condi-
tion to end the transfer. The end of the complete transfer is marked by the TXCOMP bit set to
TXRDY is used as Transmit Ready for the Peripheral DMA Controller transmit channel.
Figure 19-6. Master Write with One Data Byte
Figure 19-7. Master Write with Multiple Data Byte
Figure 19-8. Master Write with One Byte Internal Address and Multiple Data Bytes
TXCOMP
TXRDY
Write THR (DATA)
STOP sent automaticaly
(ACK received and TXRDY = 1)
TWD
A
DATA
A
S
DADR
W
P
A
DATA n
A
S
DADR
W
DATA n+5
A
P
DATA n+x
A
TXCOMP
TXRDY
Write THR (Data n)
Write THR (Data n+1)
Write THR (Data n+x)
Last data sent
STOP sent automaticaly
(ACK received and TXRDY = 1)
TWD
A
IADR(7:0)
A
DATA n
A
S
DADR
W
DATA n+5
A
P
DATA n+x
A
TXCOMP
TXRDY
TWD
Write THR (Data n)
Write THR (Data n+1)
Write THR (Data n+x)
Last data sent
STOP sent automaticaly
(ACK received and TXRDY = 1)