Re: TI-H: Re: IR Link Status (was: expensive remote control)
[Prev][Next][Index][Thread]
Re: TI-H: Re: IR Link Status (was: expensive remote control)
Sami Khawam wrote:
> What I ment was to change the protocol used by MChat so that the
> circumstance that generate the error (that was described before) will
> never happen. For example,the TI protocol does work with the Line State
> mode, the I2C protocol doesn't.
The protocol used by MChat is I2C (on the hardware level). Changing it
would violate I2C protocol support in the MBus routines. If the line-state
mode doesn't work with I2C, that's because the line-state mode is crippled,
and it probably wouldn't work with other useful protocols either.
I will list here the possible sequences an I2C-compatible link would have
to be able to handle. Calc 1 is the master, Calc 2 is a slave, and other
slaves should also work in parallel with Calc 2. I use 0's and 1's to
represent the signal level output from the calc. A 'x' means that the
signal level doesn't matter. A D means a data bit that can be either a 0 or
a 1, but has to be transmitted as such. The Total signal is the one that
calcs should read on their data pins. SDA and SCL are the two link port
pins by their I2C names (Serial DAta, Serial CLock).
START condition:
Calc1 SDA 111100
Calc2 SDA 111111
Total SDA 111100
Calc1 SCL 110000
Calc2 SCL 111111
Total SCL 110000
STOP condition:
Calc1 SDA 000011
Calc2 SDA 111111
Total SDA 000011
Calc1 SCL 001111
Calc2 SCL 111111
Total SCL 001111
Data bit from master to slave:
Calc1 SDA xDDDDx
Calc2 SDA 111111
Total SDA xDDDDx
Calc1 SCL 001100
Calc2 SCL 111111
Total SCL 001100
Data bit from slave to master:
Calc1 SDA 111111
Calc2 SDA xDDDDx
Total SDA xDDDDx
Calc1 SCL 001100
Calc2 SCL 111111
Total SCL 001100
Data bit from master to slave with clock synchronization:
(This is probably the toughest one, the slave holds the SCL signal low)
Calc1 SDA xDDDDxxxxxx
Calc2 SDA 11111111111
Total SDA xDDDDxxxxxx
Calc1 SCL 00110001111
Calc2 SCL 11110000011
Total SCL 00110000011
There are other possibilities too (e.g. when two masters try to send
simultaneously and one of them must back off), but if these here are
handled correctly, I think the link must be so good that other conditions
will also work.
> An IR signal sent in the TI protocol can be recieved by multiple
> calcs, not only 2.
This has already been discussed. I won't change MChat to use the TI
protocol.
> The problem that is here solved by rembering if
> the signal came from IR or not, was already solved (see
> the last message) by the fact that the PIC check if the
> pin is high so that it can output a low.
>
> The essetial problem hasn't been solved here: it is
> in step 5: when calc 1 relases the line it will read
> a high signal an not a low.
Yes, I see it now.
> By adding one transistor to each line the problem can
> be very easily overcome. But before making this, we
> have to see if we could solve it by software.
Try it with the transistors, or if you can find a firmware solution (I
doubt it), use that instead.
-Ozone
--
*** Osma Suominen *** ozone@clinet.fi *** http://www.clinet.fi/~ozone ***
References: