11-09-2011 08:01 PM
I am using the USB 8451 to communicate with the ISL25700 chip through LabVIEW. The ISL2570 uses the I2C on the interface. I am trying to read from the chip using the general read code that came with the interface. I keep getting the error code 301742. The device address I am using is 00h, which I got from the data sheet. The circuit I am using is the application circuit listed in the data sheet with pull-up resistors at the SDA and SCL lines. I am not sure how to fix the problem. I was also wondering how to pick a particular register to read and write from. Attached is the data sheet for the ISL25700.
Solved! Go to Solution.
11-10-2011 08:28 AM
00h is not the correct device address. That's the so-called "Device ID", but I haven't a clue what it's for since I haven't read the whole datasheet. The device address is shown on page 13. It would be 0x28. I don't recall if the USB-8451 wants the addresses in 7-bit format or 8-bit format (with the LSB set to 0).
11-10-2011 09:42 AM
I tried the address x28, however I still get the 301742 error.
11-10-2011 12:59 PM
It's possible you may have another error in your code. Can you upload your code?
11-10-2011 03:18 PM
I did not have the interface when I made the copy of the program, so it does not show the ID of the interface. Other then that, this is what I was trying to use.
11-10-2011 04:50 PM
I see two things. One, you copied the example that ships with the 8451, but that example is for reading from EEPROMs, and your device isn't an EEPROM. In your case you only specify a single byte for the "write data" array, which corresponds to the address where you want to start reading. I'd suggest settting the bytes to read to 1 for now. You do not need the "Address Endianness" or the "Number of Address Bytes" controls since they do not apply to your case. Second, your 8451 device reference is a constant, and it's set to nothing. I'd suggest making this into a control so you can specify the device from the front panel.
11-11-2011 12:11 PM
I believe I made the changes that you suggested, however I am still getting the 301742 error. Attached is the program with the changes.
11-11-2011 01:51 PM - edited 11-11-2011 01:52 PM
No, that's not right. You want to send only 1 byte. That would be the address to read from. That EEPROM address should be a U8, and you should be feeding an array of only 1 element, that simply consists of that value. Please look at the documentation more closely. It shows that the addresses are 1 byte values, i.e., U8.
By the way, have you put pull-up resistors on the SCL and SDA lines? If so, where did you place them, and how much were they?
11-12-2011 10:56 AM
I am using two 2.2K resistors for the pull-up resistors. One resistor goes from the SCL line to 5 V and the other goes from the SDA line to 5V. I changed the array to have one element and changed the EEPROM to U8. I ran the program but still get the 301742 error. I attached the program with the changes.
11-14-2011 07:10 PM
Hi Katie,
I haven't gotten a chance to take a close look at the datasheet, but if your device is expecting a 7-bit address you may want to try shifting your data 1 bit to the right. This is suggested in the error description as a potential solution for devices expecting 7-bit instructions. Does this provide any positive results?