Re: I2C trick?
- From: Ico <usenet@xxxxxxx>
- Date: 28 Dec 2007 20:20:28 GMT
Vladimir Vassilevsky <antispam_bogus@xxxxxxxxxxx> wrote:
Roberto Waltman wrote:
Suppose you have the two I2C slaves that have to be connected to the
MCU. Both slaves have the same I2C address.
First time I hear somebody doing this. Even if the devices are
"write-only" this is bad design. For example, how to diagnose
communication problems with one of them?
Of course the slaves should be addressed independently. The I2C address
can't be changed for those ICs, and there are only two I/O pins
available on the MCU. Would it be possible to get by without some sort
of I/O extender?
If you don't care for standards and specs, you could just wire things up
as you described and see if it works for your setup and your chips. No
guarantee it will work in all situations of course, even if your tests
happen to work.
No. The SDA line must be stable while SCL is high, unless when
violating this rule on purpose to signal START or STOP conditions.
Understood. But how exactly this can disrupt the communication?
Yes, the multiple wrong starts and stops could be detected. So?
The behaviour of an I2C chip is only defined as long as the signals on
the bus stick to the protocol. If the protocol is violated, just about
anything could happen, including a device locking up the bus forever.
This might happen right away, or after a few seconds, or after a few
days. If you're really unlucky, it happens only every few months.
What you are proposing is called 'undefined behaviour'. Anything could
happen, but no way to predict what or when.
If you can not configure one I2C slave to a different address or
provide another port, consider adding I2C multiplexers or switches to
the bus (PCA9545, for example)
Well you don't have to reprint the basic stuff from an ABC book on
electronics.
Sorry to interfere, but I think there is no reason to snap at somebody
who is taking the time to anwer your questions if his answer is not what
you want to hear. I think the only answer you'll get is the one you
already got: violating the protocol is just not a good idea - that's
what protocols are for. Do what you please, but don't be surprised if
things will not work out the way you planned.
--
:wq
^X^Cy^K^X^C^C^C^C
.
- References:
- I2C trick?
- From: Vladimir Vassilevsky
- Re: I2C trick?
- From: Roberto Waltman
- Re: I2C trick?
- From: Vladimir Vassilevsky
- I2C trick?
- Prev by Date: Re: Microcontrollers, USB and Linux
- Next by Date: Re: Accessing general I/O addresses
- Previous by thread: Re: I2C trick?
- Next by thread: Re: I2C trick?
- Index(es):
Relevant Pages
|