Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.arch.embedded > #31150

Re: I2C Communication between two Microcontrollers

From chris <chris-nospam@tridac.net>
Newsgroups comp.arch.embedded
Subject Re: I2C Communication between two Microcontrollers
Date 2022-07-07 17:19 +0100
Organization Aioe.org NNTP Server
Message-ID <ta7129$1vbf$1@gioia.aioe.org> (permalink)
References <9f2f7fd6-24ee-4eb5-8c3d-4b3db5b296bcn@googlegroups.com> <ta3b8u$3vja9$1@dont-email.me> <ta3evo$3vtt1$1@dont-email.me> <ta3h2e$47a$1@dont-email.me> <ta3m05$ilp$1@dont-email.me>

Show all headers | View raw


On 07/06/22 10:52, David Brown wrote:
> On 06/07/2022 10:27, Stephen Pelc wrote:
>> On 6 Jul 2022 at 09:52:23 CEST, "pozz" <pozzugno@gmail.com> wrote:
>>
>>> I found that I2C peripherals embedded in most of MCUs are very complex
>>> and most of the time they aren't reliable.
>>> After some testing, I usually decide to write a bit-banging I2C code.
>>
>> I have to agree here. I2C is conceptually simple, bu it is an edge
>> triggered
>> protocol and is very sensitive to noise unless you use buffer devices. It
>> is excellent for master devices, but writing the slave software is
>> much more
>> complex to cover all cases.
>>
>
> A key problem for I²C is the multi-drop nature of the lines. The edges
> themselves are not the big problem, it is the weak pull-up that leaves
> the lines very susceptible to noise and interference. SPI has edges, as
> do most protocols with a clock signal, but there the master drives high
> and low, giving a far more "solid" line.
>
> I²C can be fine in simple cases, but there are several less-used
> features that complicate it, especially when used together. That
> includes multi-master, clock stretching, 10-bit addressing, and newer
> faster speeds. Good luck trying to make a microcontroller slave that
> works with all of that!
>
> There is also the possibility of bus hang and invalid states. This can
> hit you during development - if you stop your microcontroller and
> restart it (perhaps with a new program version) in the middle of an I²C
> transaction, you can leave the slaves stuck - they may need a reset or
> power-cycle to recover.

The original Iic from Philips was for consumer equipment and has
worked well for that sort of application, but it's not robust enough
for professional work imho. I would never use it unless an io
device needed it, such early Teletext devices. As you say spi
is a far better sorted design...

Chris

Back to comp.arch.embedded | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

I2C Communication between two Microcontrollers Neelakantappa M <neelakantamaagi253@gmail.com> - 2022-07-05 06:28 -0700
  Re: I2C Communication between two Microcontrollers pozz <pozzugno@gmail.com> - 2022-07-05 16:22 +0200
  Re: I2C Communication between two Microcontrollers Richard Damon <Richard@Damon-Family.org> - 2022-07-05 22:33 -0400
  Re: I2C Communication between two Microcontrollers David Brown <david.brown@hesbynett.no> - 2022-07-06 08:49 +0200
    Re: I2C Communication between two Microcontrollers pozz <pozzugno@gmail.com> - 2022-07-06 09:52 +0200
      Re: I2C Communication between two Microcontrollers Stephen Pelc <stephen@vfxforth.com> - 2022-07-06 08:27 +0000
        Re: I2C Communication between two Microcontrollers pozz <pozzugno@gmail.com> - 2022-07-06 11:20 +0200
          Re: I2C Communication between two Microcontrollers Stef <me@this.is.invalid> - 2022-07-06 13:43 +0200
          Re: I2C Communication between two Microcontrollers Stephen Pelc <stephen@vfxforth.com> - 2022-07-06 15:49 +0000
        Re: I2C Communication between two Microcontrollers David Brown <david.brown@hesbynett.no> - 2022-07-06 11:52 +0200
          Re: I2C Communication between two Microcontrollers chris <chris-nospam@tridac.net> - 2022-07-07 17:19 +0100
            Re: I2C Communication between two Microcontrollers Dimiter_Popoff <dp@tgi-sci.com> - 2022-07-07 19:49 +0300
              Re: I2C Communication between two Microcontrollers Richard Damon <Richard@Damon-Family.org> - 2022-07-07 23:22 -0400
                Re: I2C Communication between two Microcontrollers Mike Perkins <spam@spam.com> - 2022-08-05 22:07 +0100
                Re: I2C Communication between two Microcontrollers Richard Damon <Richard@Damon-Family.org> - 2022-08-05 21:10 -0400

csiph-web