ATmega640/1280/1281/2560/2561
Table 24-4. Status Codes for Slave Transmitter Mode
Status Code
(TWSR)
Prescaler Bits
are 0
Application Software Response
Status of the 2-wire Serial Bus and
2-wire Serial Interface Hardware
To TWCR
To/from TWDR
Load data byte or
Load data byte
STA
X
STO
0
TWINT
1
TWEA
0
Next Action Taken by TWI Hardware
0xA8
0xB0
0xB8
0xC0
Own SLA+R has been received;
ACK has been returned
Last data byte will be transmitted and NOT ACK should
be received
X
0
1
1
Data byte will be transmitted and ACK should be re-
ceived
Arbitration lost in SLA+R/W as Load data byte or
Master; own SLA+R has been
X
X
0
0
1
1
0
1
Last data byte will be transmitted and NOT ACK should
be received
Data byte will be transmitted and ACK should be re-
ceived
received; ACK has been returned
Load data byte
Data byte in TWDR has been
transmitted; ACK has been
received
Load data byte or
Load data byte
X
X
0
0
1
1
0
1
Last data byte will be transmitted and NOT ACK should
be received
Data byte will be transmitted and ACK should be re-
ceived
Data byte in TWDR has been
transmitted; NOT ACK has been
received
No TWDR action or
No TWDR action or
0
0
0
0
1
1
0
1
Switched to the not addressed Slave mode;
no recognition of own SLA or GCA
Switched to the not addressed Slave mode;
own SLA will be recognized;
GCA will be recognized if TWGCE = “1”
Switched to the not addressed Slave mode;
no recognition of own SLA or GCA;
a START condition will be transmitted when the bus
becomes free
No TWDR action or
No TWDR action
1
1
0
0
1
1
0
1
Switched to the not addressed Slave mode;
own SLA will be recognized;
GCA will be recognized if TWGCE = “1”;
a START condition will be transmitted when the bus
becomes free
0xC8
Last data byte in TWDR has been No TWDR action or
0
0
0
0
1
1
0
1
Switched to the not addressed Slave mode;
no recognition of own SLA or GCA
Switched to the not addressed Slave mode;
own SLA will be recognized;
GCA will be recognized if TWGCE = “1”
Switched to the not addressed Slave mode;
no recognition of own SLA or GCA;
a START condition will be transmitted when the bus
becomes free
transmitted (TWEA
has been received
= “0”); ACK
No TWDR action or
No TWDR action or
1
1
0
0
1
1
0
1
No TWDR action
Switched to the not addressed Slave mode;
own SLA will be recognized;
GCA will be recognized if TWGCE = “1”;
a START condition will be transmitted when the bus
becomes free
263
2549L–AVR–08/07