Table 22-4.
Status Codes for Slave Receiver Mode
Status Code
(TWSR)
Status of the 2-wire Serial Bus
Prescaler Bits
and 2-wire Serial Interface Hard-
are 0
ware
0x60
Own SLA+W has been received;
ACK has been returned
0x68
Arbitration lost in SLA+R/W as
Master; own SLA+W has been
received; ACK has been returned
0x70
General call address has been
received; ACK has been returned
0x78
Arbitration lost in SLA+R/W as
Master; General call address has
been received; ACK has been
returned
0x80
Previously addressed with own
SLA+W; data has been received;
ACK has been returned
0x88
Previously addressed with own
SLA+W; data has been received;
NOT ACK has been returned
0x90
Previously addressed with
general call; data has been re-
ceived; ACK has been returned
0x98
Previously addressed with
general call; data has been
received; NOT ACK has been
returned
0xA0
A STOP condition or repeated
START condition has been
received while still addressed as
Slave
8271D–AVR–05/11
ATmega48A/PA/88A/PA/168A/PA/328/P
Application Software Response
To/from TWDR
STA
STO
No TWDR action or
X
No TWDR action
X
No TWDR action or
X
No TWDR action
X
No TWDR action or
X
No TWDR action
X
No TWDR action or
X
No TWDR action
X
Read data byte or
X
Read data byte
X
Read data byte or
0
Read data byte or
0
Read data byte or
1
Read data byte
1
Read data byte or
X
Read data byte
X
Read data byte or
0
Read data byte or
0
Read data byte or
1
Read data byte
1
No action
0
0
1
1
To TWCR
TWIN
TWE
Next Action Taken by TWI Hardware
T
A
0
1
0
Data byte will be received and NOT ACK will be
returned
0
1
1
Data byte will be received and ACK will be returned
0
1
0
Data byte will be received and NOT ACK will be
returned
0
1
1
Data byte will be received and ACK will be returned
0
1
0
Data byte will be received and NOT ACK will be
returned
0
1
1
Data byte will be received and ACK will be returned
0
1
0
Data byte will be received and NOT ACK will be
returned
0
1
1
Data byte will be received and ACK will be returned
0
1
0
Data byte will be received and NOT ACK will be
returned
0
1
1
Data byte will be received and ACK will be returned
0
1
0
Switched to the not addressed Slave mode;
no recognition of own SLA or GCA
0
1
1
Switched to the not addressed Slave mode;
own SLA will be recognized;
GCA will be recognized if TWGCE = "1"
0
1
0
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
0
1
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
0
1
0
Data byte will be received and NOT ACK will be
returned
0
1
1
Data byte will be received and ACK will be returned
0
1
0
Switched to the not addressed Slave mode;
no recognition of own SLA or GCA
0
1
1
Switched to the not addressed Slave mode;
own SLA will be recognized;
GCA will be recognized if TWGCE = "1"
0
1
0
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
0
1
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
0
1
0
Switched to the not addressed Slave mode;
no recognition of own SLA or GCA
0
1
1
Switched to the not addressed Slave mode;
own SLA will be recognized;
GCA will be recognized if TWGCE = "1"
0
1
0
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
0
1
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
237
Need help?
Do you have a question about the ATmega48A and is the answer not in the manual?
Questions and answers