Specifications

117
3706C–MICRO–2/11
AT89LP3240/6440
.
Table 18-6. Status Codes for Master Transmitter Mode
Status
Code
(TWSR)
Status of the Two-wire
Serial Bus and Two-wire
Serial Interface Hardware
Application Software Response
Next Action Taken by TWI HardwareTo/from TWDR
To TWCR
STA STO TWIF AA
0x08
A START condition has
been transmitted
Load SLA+W 0 0 1 X
SLA+W will be transmitted;
ACK or NOT ACK will be received
10h
A repeated STA RT
condition has been
transmitted
Load SLA+W 0 0 1 X
SLA+W will be transmitted;
ACK or NOT ACK will be received
Load SLA+R 0 0 1 X
SLA+R will be transmitted;
Logic will switch to Master Receiver mode
18h
SLA+W has been
tra
nsmitted; ACK has been
received
Load data byte 0 0 1 X
Data byte will be transmitted and ACK or NOT
ACK will be received
No action 1 0 1 X Repeated START will be transmitted
No action 0 1 1 X
STOP condition will be transmitted andSTO flag
will be reset
No action 1 1 1 X
STOP condition followed by a START condition
will be transmitted and STO flag will be reset
20h
SLA+W h
as been
transmitted; NOT ACK has
been received
Load data byte 0 0 1 X
Data byte will be transmitted and ACK or NOT
ACK will be received
No action 1 0 1 X Repeated START will be transmitted
No action 0 1 1 X
STOP condition will be transmitted and S TO
flag will be reset
No action 1 1 1 X
STOP condition followed by a START condition
will be transmitted and STO flag will be re
set
28h
Data byte has been
transmitted; ACK has been
received
Load data byte 0 0 1 X
Data byte will be transmitted and ACK or NOT
ACK will be received
No action 1 0 1 X Repeated START will be transmitted
No action 0 1 1 X
STOP condition will be transmitted and S TO
flag will be reset
No action 1 1 1 X
STOP condition followed by a START condition
will b
e transmitted and STO flag will be reset
30h
Data byte has been
transmitted; NOT ACK has
been received
Load data byte 0 0 1 X
Data byte will be transmitted and ACK or NOT
ACK will be received
No actio 1 0 1 X Repeated START will be transmitted
No actio 0 1 1 X
STOP condition will be transmitted and S TO
flag will be reset
No actio 1 1 1 X
STOP condition followed by a START condition
will be transmitted and STO flag will be reset
38h
Arbitration lost in SLA+W
or data bytes
No action 0 0 1 X
Two -w ire Serial Bus will be released and not
addressed slave mode entered
No action 1 0 1 X
A START condition will be transmitted when the
bus becomes free