Datasheet
Status Code
(TWSR)
Prescaler
Bits are 0
Status of the Two-Wire
Serial Bus and Two-Wire
Serial Interface Hardware
Application Software Response Next Action Taken by TWI
Hardware
To/From
TWDR
To TWCRn
STA STO TWINT TWEA
transmitted and TWSTO Flag
will be reset
0x20 SLA+W has been transmitted;
NOT ACK has been received
Load data
byte or
0 0 1 X Data byte will be transmitted
and ACK or NOT ACK will be
received
No TWDR
action or
1 0 1 X Repeated START will be
transmitted
No TWDR
action or
0 1 1 X STOP condition will be
transmitted and TWSTO Flag
will be reset
No TWDR
action
1 1 1 X STOP condition followed by a
START condition will be
transmitted and TWSTO Flag
will be reset
0x28 Data byte has been
transmitted;
ACK has been received
Load data
byte or
0 0 1 X Data byte will be transmitted
and ACK or NOT ACK will be
received
No TWDR
action or
1 0 1 X Repeated START will be
transmitted
No TWDR
action or
0 1 1 X STOP condition will be
transmitted and TWSTO Flag
will be reset
No TWDR
action
1 1 1 X STOP condition followed by a
START condition will be
transmitted and TWSTO Flag
will be reset
0x30 Data byte has been
transmitted;
NOT ACK has been received
Load data
byte or
0 0 1 X Data byte will be transmitted
and ACK or NOT ACK will be
received
No TWDR
action or
1 0 1 X Repeated START will be
transmitted
No TWDR
action or
0 1 1 X STOP condition will be
transmitted and TWSTO Flag
will be reset
No TWDR
action
1 1 1 X STOP condition followed by a
START condition will be
transmitted and TWSTO Flag
will be reset
ATmega48PA/88PA/168PA
Two-Wire Serial Interface (TWI)
© 2018 Microchip Technology Inc.
Datasheet Complete
DS40002011A-page 285