From: Joe G (Home) on
Hi All,

SPI is more simplistic in internal IC hardware design than I2c. If the SPI
data bus receive garbage (spikes or noise) you can pull the chip select high
and start clocking the data in/out again.

SPI has
/CS chip select
Clock
Data out
Data in

I2C has
Clock
Data

Question
========
If an I2C bus receives garbage, how does one tell a I2C receiver to "reset"
and start again, as there is only a clock and data line.

Thanks in Advance.

Joe



From: Meindert Sprang on
"Joe G (Home)" <joe.g(a)optusnet.com.au> wrote in message
news:4b6fecc1$0$3003$afc38c87(a)news.optusnet.com.au...
> Hi All,
>
> SPI is more simplistic in internal IC hardware design than I2c. If the
SPI
> data bus receive garbage (spikes or noise) you can pull the chip select
high
> and start clocking the data in/out again.
>
> SPI has
> /CS chip select
> Clock
> Data out
> Data in
>
> I2C has
> Clock
> Data
>
> Question
> ========
> If an I2C bus receives garbage, how does one tell a I2C receiver to
"reset"
> and start again, as there is only a clock and data line.

By generating a premature stop condition.

Meindert


From: Tilmann Reh on
Meindert Sprang schrieb:

>> If an I2C bus receives garbage, how does one tell a I2C receiver to
> "reset"
>> and start again, as there is only a clock and data line.
>
> By generating a premature stop condition.

....and if one of the devices eventually blocks the bus with SDA=low
(this can happen when a read access is aborted), apply SCL pulses until
SDA goes high.

Tilmann
From: don on
Tilmann Reh wrote:
> Meindert Sprang schrieb:
>
>>> If an I2C bus receives garbage, how does one tell a I2C receiver to
>> "reset"
>>> and start again, as there is only a clock and data line.
>> By generating a premature stop condition.
>
> ...and if one of the devices eventually blocks the bus with SDA=low
> (this can happen when a read access is aborted), apply SCL pulses until
> SDA goes high.
>
> Tilmann
The correct way to RESET the I2C buss, is to do a repeat-START, then a STOP.

Works every time.

don
From: Tilmann Reh on
don schrieb:

> The correct way to RESET the I2C buss, is to do a repeat-START, then a STOP.

Please note that you simply can't apply a (repeated) start condition
when a device continuously holds SDA low. In such cases, you first have
to provide SCL pulses until SDA gets high again, then do start-stop.

Tilmann