Re: I2C trick?
- From: Stefan Reuther <stefan.news@xxxxxxxx>
- Date: Sat, 29 Dec 2007 18:54:52 +0100
Vladimir Vassilevsky wrote:
"larwe" <zwsdotcom@xxxxxxxxx> wrote in message
I can imagine you could do very funky things with voltage dividers to
ensure that the master could always assert its will over both I/Os
regardless of what the other end is trying to do, but this would
result in some horrible non-spec I2C implementation. I can't imagine
shipping such a hack.
There should not be a need for such complication. So far nobody suggested a
valid reason why exactly it is a bad idea to swap the SCL and SDA to
separate the I2C slaves. I tried to do that; everything worked like
expected. This could actually be a good trick.
This trick is on the same level as assuming things about freshly-
malloced memory or relations between the addresses of local variables in
a program C. It may work, but it's not guaranteed.
If I see that correctly, the line-swapped device will see a start
condition whenever the master sends a '1' bit followed by a '0'; it will
see a '0' bit during a direction swap (between master releasing SDA
after the last bit and slave pulling SDA for acknowledge), and a '1' bit
during inactive periods (between a stop condition and a start
condition). This means, it is possible to construct a valid transaction
that is seen as, say, a start condition plus 8 data bits by the
line-swapped device. That device may now start pulling its SDA (i.e. the
current SCL) to low as an acknowledge, and thus lock up the bus.
Sure it's unlikely. But I've already seen devices lock up I2C even when
doing protocol, so I would avoid that trick if I can. Who knows what
goofs lurk in this world's I2C implementations.
Stefan
.
- Follow-Ups:
- Re: I2C trick?
- From: Vladimir Vassilevsky
- Re: I2C trick?
- References:
- I2C trick?
- From: Vladimir Vassilevsky
- Re: I2C trick?
- From: Roberto Waltman
- Re: I2C trick?
- From: Vladimir Vassilevsky
- Re: I2C trick?
- From: larwe
- Re: I2C trick?
- From: Vladimir Vassilevsky
- I2C trick?
- Prev by Date: Re: Sinful Panty Sex
- Next by Date: Re: traduction svp
- Previous by thread: Re: I2C trick?
- Next by thread: Re: I2C trick?
- Index(es):
Relevant Pages
|