02-05-2020 01:43 AM
Hi,
I want to use the USB-8451 interface to communicate with a SMBus. For the USB-8451 there are no problems reported in the Windows Device Manager or in the Measurement & Automation Explorer. Furthermore I installed the latest NI 845x driver.
When I want to test the communication with the example "General I2C Read", in the SubVI "NI-845x I2C Create Configuration Reference" appears a Coercion dot (see photo below). Any ideas?
Thanks
Sven
02-05-2020 05:37 AM
It is going from a reference to a typedef of a reference. Don't worry about it.
02-05-2020 06:24 AM
The problem is that I get an error message while executing the LabVIEW example "General I2C Read".
The error has the code 301742 with the message:
NI-845x: The slave did not acknowledge an address and 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´m very sure that the SubVI "NI-845x I2C Create Configuration Reference" (the program in the picture above) is the source of the error. You can see this with execution highlighting
02-05-2020 06:41 AM
That error is not coming from the Create Configuration Reference. It coming from when you try to read and it clearly states you are using the wrong address.
02-05-2020 07:07 AM
Yes I know, but I already tried all 256 hex values for the address (no joke; the value (0x16) I found in the data sheet did not work), so I was pretty sure that the i2c configuration has to be the error source.
02-05-2020 08:20 AM
@svenw wrote:
the value (0x16) I found in the data sheet did not work
Due to how some of the data sheets work, I would have next tried 0x0B (0x16 shifted right 1). What device are you trying to talk to?
02-05-2020 08:45 AM
Thanks for your advice. I tried all possible values from 0x00 up to 0xFF (with both SMBus and I2C). I am trying to communicate with a BQ40Z50 R1.