Datasheet

204
ATtiny828 [DATASHEET]
8371A–AVR–08/12
Figure 86. TWI Arbitration
Figure 86 shows an example where two TWI masters are contending for bus ownership. Both devices are able to issue a
START condition, but DEVICE1 loses arbitration when attempting to transmit a high level (bit 5) while DEVICE2 is
transmitting a low level.
Arbitration between a repeated START condition and a data bit, a STOP condition and a data bit, or a repeated START
condition and STOP condition are not allowed and will require special handling by software.
19.3.9 Synchronization
A clock synchronization algorithm is necessary for solving situations where more than one master is trying to control the
SCL line at the same time. The algorithm is based on the same principles used for clock stretching previously described.
Figure 87 shows an example where two masters are competing for the control over the bus clock. The SCL line is the
wired-AND result of the two masters clock outputs.
Figure 87. Clock Synchronization
A high to low transition on the SCL line will force the line low for all masters on the bus and they start timing their low
clock period. The timing length of the low clock period can vary between the masters. When a master (DEVICE1 in this