Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

USB to I2C communication, CP2112 dev kit and ADT7470

If all you need to do is call these functions in succession, you can place them all on the block diagram and wire the error wires to control the order of the calls. 

0 Kudos
Message 11 of 16
(2,836 Views)

Hi jdl,

       I also use the DLL, But the HID_SMBUS_READRESPONSE's buffer will lost data,

       if the data  have 0x00.

       Example:

       If the return datais "0x01 0x01 0x00 0x00 0x12 0x32".

       The HID_SMBUS_READRESPONSE's buffer only send "0x01 0x01" to Labview.

       Do you have the same question?

       Can you share your experience?

       Thank you for your help.

justin

 

 

      

  

0 Kudos
Message 12 of 16
(2,323 Views)

Justin,

 

Again, I'm not familiar with that specific driver, but are you sure that the HID_SMBUS_READRESPONSE function is reading enough bytes? Is there an input to specify how much data to read?

0 Kudos
Message 13 of 16
(2,311 Views)

Hi elcalvweado, 

 

Thanks for your responce, the HID_SMBUS_READRESPONSE has a parameter (number byte read). It show the correct return number.

 

justin

 

 

 

0 Kudos
Message 14 of 16
(2,273 Views)

I appreciate this thread is a couple of years old, but I was wondering if you had any code you could share.

I am up against a similar problem, although I am not using the dev kit, but am instead trying to communicate with the CP2112 on a 3rd party board.

If I use the GUI from the Silicon Labs wesite, I can connect to the CP2112, and control GPIOs, etc.

However, I have had no success in calling the SLABHIDtoSMBus.dll from LabVIEW.  For me, the HidSmbus_Open function always returns 0x0001, which the API doc tells me means HID_SMBUS_DEVICE_NOT_FOUND.

Any thoughts?

Dan
CLD
0 Kudos
Message 15 of 16
(1,345 Views)

Hi Dan,

 

Have you tried specifying the vendor and product IDs?

 

Also, as you mentioned, this is an older post so I would recommend creating a new post with your question.  This will increase traffic flow on your post.

Niki Budgell | Product Planner - SW Management | NI
0 Kudos
Message 16 of 16
(1,328 Views)