04-22-2015 08:47 AM
Hello,
i want to use a humidity sensor with an i2c comunication sequence described in the attached file. Using the NI-845x basic I2C API i get a communication error. Therfore i have to program a script with the advanced i2c API. Can anyone help me how to use the ni845xI2cScriptxxxx commands (for c) to map the communication sequence of this sensor ?
Thanks a lot !
04-22-2015 09:56 AM
@BBaffoun wrote:
Hello,
i want to use a humidity sensor with an i2c comunication sequence described in the attached file. Using the NI-845x basic I2C API i get a communication error. Therfore i have to program a script with the advanced i2c API. Can anyone help me how to use the ni845xI2cScriptxxxx commands (for c) to map the communication sequence of this sensor ?
Thanks a lot !
Are you or your manager willing to pay this person to write the code for you?
04-23-2015 04:29 AM
Hey Nyc,
what kind of help do you need? The communication sequence for your humidity sensor doesn't contains anything, which is not a normal I²C communication. Which error do you receive if you uise the basic I²C API? An error reported by the API can be a result of wrong cabling, missing termination resistors, logical issues and so one.
You will receive more attention from the forum user, if you attach you current code too.
Stephan
04-23-2015 06:46 AM
Hey Stephan,
i think, the challenge consists in mapping the "transmission start" sequence !!!
i've attached my current code. After the write / read command i get the error code = -301742: "slave can't recognize the address and the direction byte of the i2c master"
04-23-2015 07:00 AM
I think the transmisson start sequence only looks a little bit confusing, but is the regular start condition for an I²C transmission. The start of a transmision is defined as the falling edge of the Data line during a high signal on the SCK (Serial Clock) line.
I2C Bus Specification
http://i2c.info/i2c-bus-specification
And if I take a look into the communication sequence, the last part of the transmission start is a falling edge of the SCK line during a high signal of the Data line. I think the picture should show that you need this special transision and any other changes of the SCK and Data line are ignored.
Stephan