Datasheet

Figure 23-18. Formats and States in the Slave Receiver Mode
S SLA W A DATA A
0x60 0x80
0x88
A
0x68
Reception of the o wn
sla v e address and one or
more data b ytes. All are
acknowledged
Last data b yte receiv ed
is not ac kno wledged
Arbitration lost as master
and addressed as sla v e
Reception of the gener al call
address and one or more data
bytes
Last data b yte receiv ed is
not ac knowledged
n
From master to sla v e
From sla v e to master
Any number of data b ytes
and their associated ac kno wledge bits
This n umber (contained in TWSR) corresponds
to a defined state of the 2-Wire Ser ial Bus. The
prescaler bits are z ero or mask ed to z ero
P or SDATA A
0x80
0xA0
P or SA
A DATA A
0x70 0x90
0x98
A
0x78
P or SDATA A
0x90
0xA0
P or SA
General Call
Arbitration lost as master and
addressed as sla v e b y gener al call
DATA A
23.7.5. Miscellaneous States
There are two status codes that do not correspond to a defined TWI state, see the table in this section.
Status 0xF8 indicates that no relevant information is available because the TWINT Flag is not set. This
occurs between other states, and when the TWI is not involved in a serial transfer.
Status 0x00 indicates that a bus error has occurred during a 2-wire Serial Bus transfer. A bus error occurs
when a START or STOP condition occurs at an illegal position in the format frame. Examples of such
illegal positions are during the serial transfer of an address byte, a data byte, or an acknowledge bit.
When a bus error occurs, TWINT is set. To recover from a bus error, the TWSTO Flag must set and
TWINT must be cleared by writing a logic one to it. This causes the TWI to enter the not addressed Slave
mode and to clear the TWSTO Flag (no other bits in TWCRn are affected). The SDA and SCL lines are
released, and no STOP condition is transmitted.
Atmel ATmega644A [DATASHEET]
Atmel-42716C-ATmega644A_Datasheet_Complete-10/2016
286