Searching \ for '[OT] I2C acklowledge problems' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/i2cs.htm?key=i2c
Search entire site for: 'I2C acklowledge problems'.

Exact match. Not showing close matches.
PICList Thread
'[OT] I2C acklowledge problems'
1999\01\02@221018 by Herbert Graf

picon face
   I am trying to use I2C parts on a house monitoring network and am having
a problem. I am looking for a way to detect whether an address is present or
not on the network, since there is the possiblity for a device to be
disconnected. I decided to use the ack part of the I2C frame to detect
whether a device is present, thinking that without a device being present
the ack wouldn't be received. According to the NS LM75 data sheet (one of
the devices I am using) the device sends an ack (by making SDA low) right
after the address byte is sent, unfortunately this is always returned as a 0
(ack accepted) whether or not a device is present. I don't understand how
this could be, do other devices on the network send the ack even if they are
not being addressed?? Has anyone sucessfully detected the ack sent by the
LM75 (or other I2C device)? Am I understanding the concept of an ack
properly? Just as an addition, I have made sure that the master is high
during this time that ack should be sent. Thank you for any help. TTYL

1999\01\02@230456 by Gyorgy

flavicon
face
Hi
> after the address byte is sent, unfortunately this is always returned as a 0
> (ack accepted) whether or not a device is present. I don't understand how
> this could be, do other devices on the network send the ack even if they are
> not being addressed?? Has anyone sucessfully detected the ack sent by the
> LM75 (or other I2C device)? Am I understanding the concept of an ack
> properly? Just as an addition, I have made sure that the master is high
Yes, you are.
> during this time that ack should be sent. Thank you for any help. TTYL


Is't there an another device at same adress as the L75?
Do you use the correct pull up resistors?

Cheer George

1999\01\03@013731 by Herbert Graf

picon face
On 1999-01-03 spam_OUTPICLISTTakeThisOuTspamMITVMA.MIT.EDU said:
  >Hi
  >> after the address byte is sent, unfortunately this is always
  >>returned as a 0  (ack accepted) whether or not a device is present.
  >>I don't understand how  this could be, do other devices on the
  >>network send the ack even if they are  not being addressed?? Has
  >>anyone sucessfully detected the ack sent by the  LM75 (or other
  >>I2C device)? Am I understanding the concept of an ack  properly?
  >Just as an addition, I have made sure that the master is high Yes,
  >>you are.  during this time that ack should be sent. Thank you for
  >any help. TTYL
  >Is't there an another device at same adress as the L75?
  >Do you use the correct pull up resistors?

    Well, I reduced the network to three devices, one at 145, one at 147
and one at 159, they all respond with different temps, now say I physically
remove the 145 and request data from 145, I get a response of all 1's and
the DATAGOOD flag set,
which is set if ack is 0, which is the way I understand it works,
but without a device there shouldn't have been anything out there to pull
the line low, just doesn't make sense. I am using 10K pullups. Could it be
that I am going a distance? My I2C bus is about 10 meters (30 feet) long,
all the devices work though, just the ack doesn't seem to. I am clocking out
of a PC LPT port so I doubt the system is going to fast, but maybe that is
it. It is not that serious, it just means that if a sensor is disconected I
get a meaningless reading, but it does bug me. Thanks for any help. TTYL
Net-Tamer V 1.11 - Test Drive

1999\01\03@022346 by Michael J. Ghormley

flavicon
face
Herbert Graf wrote:

>      Well, I reduced the network to three devices, one at 145, one at 147
> and one at 159, they all respond with different temps, now say I physically
> remove the 145 and request data from 145, I get a response of all 1's and
> the DATAGOOD flag set,
> which is set if ack is 0, which is the way I understand it works,
> but without a device there shouldn't have been anything out there to pull
> the line low, just doesn't make sense. I am using 10K pullups. Could it be
> that I am going a distance? My I2C bus is about 10 meters (30 feet) long,
> all the devices work though, just the ack doesn't seem to. I am clocking out
> of a PC LPT port so I doubt the system is going to fast, but maybe that is
> it. It is not that serious, it just means that if a sensor is disconected I
> get a meaningless reading, but it does bug me. Thanks for any help. TTYL
> Net-Tamer V 1.11 - Test Drive

This is so simple, that I hesitate to bring it up, but it might help so I'll cha
nce it.

You say that you have reduced the network to three devices but when you pull the
LM75 from
address 145 you are still detecting a LOW ACK (via the DATAGOOD flag being set)
when you do a
read, yes?  How about taking ALL the devices off of the network and see if you s
till are
detecting the ACK.  This would tell you if the line is actually being pulled LOW
or your code
is somehow seeing a LOW when nothing is ACKing.  Perhaps you are doing one of th
ose
read-modify-write things?

Please excuse me if this is too simple or if I have missed something.

Michael

* TAKE THE '.NOSPAM' OUT OF MY ADDRESS TO REPLY
**********************************************
Outside of a dog, a book is man's best friend.
Inside of a dog, it's too hard to read anyway!
                                 Groucho Marx
**********************************************

1999\01\03@230816 by Gyorgy

flavicon
face
Hi,

>      Well, I reduced the network to three devices, one at 145, one at 147
> and one at 159, they all respond with different temps, now say I physically
> remove the 145 and request data from 145, I get a response of all 1's and
> the DATAGOOD flag set,

May be I'm wrong but I think if we look into the addressing mode
you can't get the odd number of address.
The 4 MSB are the 1001. These are fixed in the IC. You can play with
the other 3 bits so they give you from 144 to 158 but not the odd
numbers.
The LSB which gives you the odd numbers is the read/write bit so it's
not part of the address.

May be it's helps

Cheer George

1999\01\04@103947 by Joe McCauley
picon face
At 22:00 02/01/99 -0500, you wrote:
>    I am trying to use I2C parts on a house monitoring network and am having
>a problem. I am looking for a way to detect whether an address is present or
>not on the network, since there is the possiblity for a device to be
>disconnected. I decided to use the ack part of the I2C frame to detect
>whether a device is present, thinking that without a device being present
>the ack wouldn't be received. According to the NS LM75 data sheet (one of
>the devices I am using) the device sends an ack (by making SDA low) right
>after the address byte is sent, unfortunately this is always returned as a 0
>(ack accepted) whether or not a device is present. I don't understand how
>this could be, do other devices on the network send the ack even if they are
>not being addressed?? Has anyone sucessfully detected the ack sent by the
>LM75 (or other I2C device)? Am I understanding the concept of an ack
>properly? Just as an addition, I have made sure that the master is high
>during this time that ack should be sent. Thank you for any help. TTYL
>
>

You should be able to detect a 1 when the device is not present. Try
disconnecting all
other devices from the bus except the master and see what happens. Are you
sure you are getting a valid ACK when the device is in the circuit? Try
putting a resistance in series with the SDA line on the device in question
(about 100 Ohms). When you monitor the SDA pin of the device you will
notice that data being sent to the device will have a low value which is
slightly higher than 0V. The ACK pulse from the device will have a low
level of 0V.

I have made a system using 16f84s as I2C slaves and can detect missing
units by using the ACK pulse.

Hope this helps

Joe

More... (looser matching)
- Last day of these posts
- In 1999 , 2000 only
- Today
- New search...