02-10-2014 10:31 PM - edited 02-10-2014 10:39 PM
The product documentation of the sensor and the datasheet is attached. Also Digilent MXP Breadboard's image is attached.
I've connected the sensor to myRIO using the starter kit's MXP breadboard: http://www.digilentinc.com/Products/Detail.cfm?NavPath=2,842,1216&Prod=MXP-BB
The output of the sensor is in digital. My initial goal is to get digital output in form of 8 or 12 or 14 bits and then convert them to decimal numbers and record them.
Pin 1 of sensor is Data, which is connected to myRIO's connector A, DIO1 pin 13.
Pin 3 of sensor is Clock, which is connected to myRIO's connector B DIO5/SPI.CLK pin 21. According to the datasheet of the sensor, if VDD < 4.5V then Clock should be set to 1MHz.
Pin 4 of sensor is Ground, which is connected to Digilent MXP Breadboard GND pin.
Pin 8 of sensor is VDD, which is connected to Digilent MXP Breadboard +3.3V pin. Supply voltage range is 2.4-5.5V and recommended voltage is 3.3V.
I need to be able to send the following commands to the sensor from LabVIEW.
Measure temperature: 00000011
Measure relative humidity: 00000101
Then, myRIO has to wait for maximum 20 milliseconds (ms) for 8-bit measurement, 80 ms for 12-bit measurement, and 320 ms for 14-bit measurement.
Two bytes of measurement data will then be transmitted. myRIO as microcontroller must acknowledge each byte by pulling the DATA line (pin 13) low. All values are Most Significant Bit (MSB) first. Note that for 8-bit result, the first byte is not used. Finally, myRIO has to terminate the communication after the measurement data Least Significant Bit (LSB) has been received by keeping ACK bit, which is the LSB bit, as high.
02-11-2014 05:18 AM
Have you searched the forum?
http://forums.ni.com/t5/LabVIEW/Sensirion-sht7x-labview/m-p/350958/highlight/true#M179022