Slave Transmitter
Mode
ATmega128
222
Figure 101. Formats and States in the Slave Receiver Mode
Reception of the
S
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 slave by general call
From master to slave
From slave to master
In the Slave Transmitter mode, a number of data bytes are transmitted to a master receiver (see
Figure
102). All the status codes mentioned in this section assume that the prescaler bits are
zero or are masked to zero.
Figure 102. Data Transfer in Slave Transmitter Mode
Device 1
SLAVE
TRANSMITTER
SDA
SCL
To initiate the Slave Transmitter mode, TWAR and TWCR must be initialized as follows:
SLA
W
A
DATA
$60
A
$68
General Call
A
DATA
$70
A
$78
DATA
A
n
Device 2
Device 3
MASTER
RECEIVER
A
DATA
A
$80
$80
A
$88
A
DATA
A
$90
$90
A
$98
Any number of data bytes
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
V
CC
........
Device n
R1
P or S
$A0
P or S
P or S
$A0
P or S
R2
2467S–AVR–07/09
Need help?
Do you have a question about the ATmega128 and is the answer not in the manual?