English
Language : 

ATMEGA8_14 Datasheet, PDF (177/331 Pages) ATMEL Corporation – High-performance, Low-power Atmel
ATmega8(L)
Figure 81. Formats and States in the Master Receiver Mode
MR
Successfull
reception
S
from a slave
receiver
$08
Next transfer
started with a
repeated start
condition
SLA
R
A
$40
DATA
Not acknowledge
received after the
slave address
Arbitration lost in slave
address or data byte
Arbitration lost and
addressed as slave
A
P
$48
A or A
Other master
continues
$38
A
Other master
continues
$68 $78 $B0
A
DATA
A
P
$50
$58
RS
SLA
R
$10
W
MT
A
Other master
continues
$38
To corresponding
states in slave mode
From master to slave
From slave to master
DATA
n
Any number of data bytes
A
and their associated acknowledge bits
This number (contained in TWSR) corresponds
to a defined state of the Two-Wire Serial Bus. The
prescaler bits are zero or masked to zero
Slave Receiver Mode
In the Slave Receiver mode, a number of data bytes are received from a Master Transmitter
(see Figure 82). All the status codes mentioned in this section assume that the prescaler bits are
zero or are masked to zero.
Figure 82. Data transfer in Slave Receiver mode
VCC
Device 1
Device 2
SLAVE
MASTER
Device 3 ........ Device n
R1
R2
RECEIVER
TRANSMITTER
SDA
SCL
To initiate the Slave Receiver mode, TWAR and TWCR must be initialized as follows:
TWAR
value
TWA6
TWA5
TWA4
TWA3
TWA2
Device’s Own Slave Address
TWA1
TWA0
TWGCE
2486AA–AVR–02/2013
177