LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

i2c help need with pull up resistor problem

I've been troubleshooting with my i2c device for 2 weeks. I've made sure all connections are correct and have even had associates check as well. My device requires two 10K resistors which I am using but I keep getting this message:

Error -301740 occurred at NI-845x I2C Write.vi:2

Possible reason(s):

NI-845x: The I2C master failed to seize the bus. Reasons include the absence of a pullup resistor on the SDA line, SCL line, or both, a transaction in progress by another master, or a bus fault condition in which the SDA line, SCL line, or both are being held low.

Does anyone know what I should do?
Thanks,
Ross
0 Kudos
Message 1 of 16
(8,586 Views)
Hello,
 
I would start with checking the signals with an oscilloscope. Do you have the correct amplitude on the SCL and SDA pins and are they toggeling as expected?
 
Second would be if you have any other application running that also is communicating with the I2C that could "seize the bus", then close that one.
 
Also as the error mesage states could there be another master on the I2C bus? Or is your device not set to slave?
 
BR
Thomas
0 Kudos
Message 2 of 16
(8,568 Views)
Hey rbme!  The 8451 requires pull up resistors between the ranges of 2.2 to 4.4 kOhms.  Please refer to the Knowledge Base article below:

http://zone.ni.com/devzone/cda/tut/p/id/5767

Also, what example VI are you running?  Thanks!
Best Regards,
Song Mu
National Instruments San Diego
0 Kudos
Message 3 of 16
(8,552 Views)

Ok thanks guys, I will try all thoses things right now and I am using my own VI for an HMC 6343.  If you like to look at it just let me know your email so that I can send it directly.

Thanks and will let you know result soon,

Ross

0 Kudos
Message 4 of 16
(8,540 Views)

Song,

I have a quick question: If my device requires a pull up resistor of 10k on the SDA and then the 8451 requires a 2.2-4.4k resistor on the SDA, how do I go about doing this?

Thanks,
Ross

0 Kudos
Message 5 of 16
(8,534 Views)
I've changed the pull up resistor to the 8451 required, 2.2-4.4k, and I don't have any other master.  My device is a slave, thus my problem must be a bus fault.  What is a bus fault and how can I fix it?  Please Help!
0 Kudos
Message 6 of 16
(8,487 Views)

rbme,

What appears to be happening is the 8451 sees that one or both of the I2C lines are being held low. It thinks that something else has control. What you can do for starters is to check the voltage of the scl and sda lines. You can do this with the 8451 removed from the system. Take a voltmeter, or an oscilloscope and probe the scl or the sda line of the slave device. Both should be idle high (either 3.3v or 5v). If either line is low, then you have a problem with your circuit. If both lines are high, then we need to look further.

 

Tobin

0 Kudos
Message 7 of 16
(8,469 Views)
I checked the values and the SCL was 2.7V and the SDA was 0.55V with the 8451 attached.  I am not sure what you mean by having the 8451 not connect, because what would supply power then?  Attached is the schematic I am using for my circuit from the manufacture of my sensor (Honeywell).  From +5V from the 8451 goes into a 3.3V Regulator then to the two resistors then to the VDD's of the HMC6343.
Thanks!
0 Kudos
Message 8 of 16
(8,457 Views)

rbme,

I'm presently downloading a microsoft office compatibility pack so I can view your attachement. But, in the mean time, if you are using the 8451 to supply power to your device, then just disconnect the scl and sda lines from the 8451 and leave the power connections intact. The pull up resistors still need to be connected between power and scl and sda of your device.

I just want to find out if your device is pulling the sda line low by itself. Sometimes, an I2C slave device my hold the line low if it does not power-up correctly.

I've just completed my download. I'll install it and then view your document. I may make further comments then.

Tobin

0 Kudos
Message 9 of 16
(8,445 Views)

rbme,

I've looked at the schematic that you posted. I've reviewed the spec for the slave device. Drawing power through the 8451 should be fine since it is only about 5 mA.

The only things that I can suggest are: make sure that the power-up rise time for the device is at least 0.05v/msec (per the spec for the slave device). If you have a filter capacitor on the supply line that is too large, it may slow the power-up rise time. This could cause the device to latchup and hold the data line low. The other thing is to make sure that both the slave device and the 8451 share the same ground reference. I expect that is already the case since you are using the 8451 to supply power.

If you measure the slave device while the clock and data lines are disconnected from the 8451 and they are fine (high) and then connect them to the 8451 and the data line latches low, then we may need to suspect the 8451.

Do you have any other I2C slave devices that you could connect to the 8451? Even if you don't run the VI, the clock and data lines of the 8451 should be idle high if the pull-up resistors are attached.

 

Tobin

0 Kudos
Message 10 of 16
(8,435 Views)