LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

usb-8451 i2c developement

Generated a simple program to talk to i2c on NSE5310 using usb-8451.  I get the following error.

 

 

Error -301742 occurred at NI-845x I2C Write Read.vi:1

 

Possible reason(s):

NI-845x:  The slave did not acknowledge an address+direction byte transmitted by the I2C master. Reasons include the incorrect address set in the I2C configuration or the incorrect use of the 7-bit address. When entering an address to access a 7-bit device, do not include the direction bit. The NI-845x Basic I2C API internally sets the direction bit to the correct value, depending on the function (write or read). If your datasheet specfies the 7-bit device address as a byte, discard the direction bit (bit 0) and right-shift the byte value by one to create the 7-bit address.

 

I do have pullup resistors of 1.5k on both SDA and SCL.  I've attached the data sheet for the device and a sample program. 

 

THANKS FOR YOUR TIME.   Happy Holidays.............................

Download All
0 Kudos
Message 1 of 5
(2,752 Views)

You are providing the wrong address. As the error message says, you must provide the 7-bit address, excluding the read/write bit. . You are providing the full value of the first byte, including the read/write bit. In other words, you are doing the exact opposite of what the error message tells you to do. If you've set the user-bits to 0 then the correct address is 0x40.

 

Side-note: When you set a front panel numeric control to hex display you should also display the radix so that others know that it refers to "81" hex, and not "81" decimal, which are two different values.

0 Kudos
Message 2 of 5
(2,745 Views)

Thanks for your reply. 

0 Kudos
Message 3 of 5
(2,730 Views)

Well, did that fix the problem?

0 Kudos
Message 4 of 5
(2,725 Views)
Have not.
0 Kudos
Message 5 of 5
(2,723 Views)