LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

I2C Lockup on cRIO 9045 module 9402

I have little knowledge of I2C communications and wonder if anyone can help explain / resolve a lockup issue.

 

I am using a cRIO 9045 with module NI9402 to communicate with a Sensirion SHT85 sensor. https://sensirion.com/products/catalog/SHT85  (powered by module ni9401). I'm using example code from I2C&SPI API  (attached below). This code is working with the sensor and I am able to get sensible readings of Temperature and Humidity.

 

If any cabling is removed from the NI9402 or the test software is stopped running and restarted on the cRIO I have issues regaining communication with the sensor. Each time the software is restarted the sensor is power cycled. The only way I seem to regain communications is if I completely power down the cRIO and restart it back up. I'm wondering if there is a away to avoid this and regain communications with the sensor programmatically?

 

I've tried a software reset via the code below (page 13 of the data sheet) by sending hex code 0x30A2 and that doesn't work. How would I enable an interface reset using the code below? I'm unsure if I am able to just toggle the SCL and keep the SDA high using the software available to me or if this will even resolve the issue.

 

 

 

 

 

0 Kudos
Message 1 of 2
(111 Views)

If power cycle the cRIO helps, how about creating a state to set all outputs to low, as if the NI-9402 is powered down?

-------------------------------------------------------
Applications Engineer | TME Systems
https://tmesystems.net/
0 Kudos
Message 2 of 2
(59 Views)