Datasheet
Status Code
(TWSR)
Prescaler
Bits are 0
Status of the Two-Wire Serial
Bus and Two-Wire Serial
Interface Hardware
Application SofTWARne Response Next Action Taken by TWI
Hardware
To/from
TWDRn
To TWCRn
STA STO TWINT TWEA
GCA will be recognized if
TWGCE = “1”; a START condition
will be transmitted when the bus
becomes free
Figure 26-18. Formats and States in the Slave Receiver Mode
S SLA W A DATA A
0x60 0x80
0x88
A
0x68
n
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
DATA A
Reception of the own
slave address and one or
more data bytes. All are
acknowledged
Last data byte received
is not acknowledged
Arbitration lost as master
and addressed as slave
Reception of the general call
address and one or more data
bytes
Last data byte received is
not acknowledged
Arbitration lost as master and
addressed as sla v e b y gene r al call
From master to slave
From slave to master
Any number of data bytes
and their associated acknowledge bits
This n umber (contained in TWSR) corresponds
to a defined state of the Two-Wire Serial Bus. The
prescaler bits are zero or masked to zero.
26.7.5 Miscellaneous States
There are two status codes that do not correspond to a defined TWI state, see the table in this section.
ATmega48PA/88PA/168PA
Two-Wire Serial Interface (TWI)
© 2018 Microchip Technology Inc.
Datasheet Complete
DS40002011A-page 298