English
Language : 

PIC18F87K22 Datasheet, PDF (322/548 Pages) Microchip Technology – 64/80-Pin, High-Performance, 1-Mbit Enhanced Flash Microcontrollers with 12-Bit A/D and nanoWatt XLP Technology
PIC18F87K22 FAMILY
21.4.17.2 Bus Collision During a Repeated
Start Condition
During a Repeated Start condition, a bus collision
occurs if:
a) A low level is sampled on SDAx when SCLx
goes from a low level to a high level.
b) SCLx goes low before SDAx is asserted low,
indicating that another master is attempting to
transmit a data ‘1’.
When the user deasserts SDAx and the pin is allowed
to float high, the BRG is loaded with SSPxADD<6:0>
and counts down to 0. The SCLx pin is then deasserted
and when sampled high, the SDAx pin is sampled.
If SDAx is low, a bus collision has occurred (i.e., another
master is attempting to transmit a data ‘0’,
Figure 21-31). If SDAx is sampled high, the BRG is
reloaded and begins counting. If SDAx goes from
high-to-low before the BRG times out, no bus collision
occurs because no two masters can assert SDAx at
exactly the same time.
If SCLx goes from high-to-low before the BRG times
out and SDAx has not already been asserted, a bus
collision occurs. In this case, another master is
attempting to transmit a data ‘1’ during the Repeated
Start condition (see Figure 21-32).
If, at the end of the BRG time-out, both SCLx and SDAx
are still high, the SDAx pin is driven low and the BRG is
reloaded and begins counting. At the end of the count,
regardless of the status of the SCLx pin, the SCLx pin is
driven low and the Repeated Start condition is complete.
FIGURE 21-31: BUS COLLISION DURING A REPEATED START CONDITION (CASE 1)
SDAx
SCLx
RSEN
Sample SDAx when SCLx goes High,
If SDAx = 0, Set BCLxIF and Release SDAx and SCLx
BCLxIF
S
SSPxIF
Cleared in Software
‘0’
‘0’
FIGURE 21-32:
BUS COLLISION DURING REPEATED START CONDITION (CASE 2)
TBRG
TBRG
SDAx
SCLx
BCLxIF
RSEN
S
SSPxIF
SCLx goes Low Before SDAx,
Set BCLxIF, Release SDAx and SCLx
Interrupt Cleared
in Software
‘0’
DS39960B-page 322
Preliminary
 2010 Microchip Technology Inc.