I2C reading problems: multiple addresses
Chuck Minton
Posts: 45
Please disregard this post... I mistakenly posted it to general post also..
My bad~
I am trying to read the 4 possible temp readings from an LM92 2 bit address.
Does anyone have any experience with stretching the clock on and I2C buss.
Any suggestions welcomed... I know the I2C buss is not designed to run on long wires. but plenty of success has been proven it can be done by streching the signal out.
My bad~
I am trying to read the 4 possible temp readings from an LM92 2 bit address.
Does anyone have any experience with stretching the clock on and I2C buss.
Any suggestions welcomed... I know the I2C buss is not designed to run on long wires. but plenty of success has been proven it can be done by streching the signal out.
Comments
-Phil
I am trying to read the 4 possible temp readings from LM92's (2 bit address).
All of the sensors I have send back their data correctly.
All the positions can read the temp data correctly.
I can read 3 of the 4 sensors when all the sensors are connected.
Usually the last sensor T4 has a reading issue. Sometimes the T3 has an issue. Usually T4 is not recognized as not present. On occasion I get erroneous data back.
I am running these on Cat 5 wire for placement.
originally I thought It was the length of wire I was using.. To challenge this I put an entire 100 feet on a sensor and I can read the temp on 100' of CAT5!
I can read the temp on short lengths like on only 4" of the same.
I have both clk and data 2K pullup resistors.
The problem is obscure in that if I if I un-plug one of the three that are reading then I can read the last one,t4.
I thought it might need more capacitor decoupling at the sensor.. .1& 1 uF across Vcc & gnd. and .1uF across each address to gnd.
I was reading in the documentation that came with these and it said that these could be read at hundreds of feet if the clocking was slowed down.
ON one hand I am thinking the length of wire might have something to do with it but why could I read the 100' one and not be able to read a 4" long run just because of the physical location on the board or the sequence in which they are read. They are all read from T1 to T4 sequentially, with multiple lines of conditional code between each read.
I tried putting waits between each read request. That did not help anything.
Does anyone have any experience with stretching the clock on and I2C buss and able to explain to me the theory and detail about implementation.
Also any ideas on how to access or "read" the actual bits going and coming and how thy line up.
I am using a 16bitread modified I2C SPIN Object by James Burrows May 2006 Version 1.3
Any suggestions welcomed... I know the I2C buss is not designed to run on long wires. I have read of success after slowing things down.
I would appreciate all comments.
Thanks, Chuck
You have posted this same issue in one other thread -- possibly two other threads. This is what is called "cross-posting" and is frowned upon in the forum. You won't get more help by starting more threads. Please try to confine your topic to a single thread so that all the pertinent information is contained in one place.
-Phil
Is there a way to remove one of them???
Ok,
The pin out are as follows:
Green:Clk , Green/White: T Critical ( un-used and pulled up via 10K)
Orange: Data , Orange/White: T Alarm (un-used and pulled up via 10K)
Blue: Gnd , Blue/White : pin 6, lsb address
Brown: pin 7 msb address , Brown/White Vcc3.3v
I started with 10K pullups but the length of wire worked better at 2K.
I have tried 200ohm but this did nothing.
The Different sequences of the long wires vs the short wires is non-consequential. T4 has the most problem, but it is closest to the pull ups, and closest to the prop.
The lit said distances would work better if I could slow down the or " stretch" the clock cycle, but I don't know if that is the problem since it works on the long wire.
What do you think about placing a resistor in series with the Clk and Data on each run to dissipate reflected currents???
Actuall... thinking about it There seems to be more trouble with the shorter ones than the longer ones. If I place the 2 shorter ones on T2 and T3, when I plug in a long T4 the error occurs on one of the shorter temp sensors.
The lengths are:
4"
4'
20'
100'
/Chuck
-Phil
It's not clear from your suggestion whether the resistors should be in series or terminated to Vdd or ground. The latter won't work, unfortunately, since I2C devices do not have sufficient drive. That's why I suggested putting the 100-ohm resistor in series with a small cap, thus creating an AC impedance-matching termination that doesn't affect the DC load.
-Phil