Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

SPI and I2C Driver API

Hello All,

    I am trying to use an NI 9402 module to utilize I2C communication to talk to a compass sensor as it is stated possible here: https://www.ni.com/en/support/downloads/tools-network/download.spi-and-i2c-driver-api.html. 

     The fpga layer compiles succesfully, but I am recieving no indication that the communication is successful (there are lights that are supposed to blink), and the read returns nothing but 255.   I have attached a screenshot from the front panel showing the parameters I am using.  Taking an oscilloscope to the scl pin reveals a regular square wave as expected.  The SDA line also shows data being actively changed as well (the program is indeed outputting).

 

The datasheet for the sensor I am using including expected communication results is shown here.

http://www.elechouse.com/elechouse/images/product/GY-26-USART%20Digital%20Compass/gy-26%20manual.pdf

 

Any help that could be given to get this sensor up and running would be greatly appreciated!

Thanks,

Daniel

0 Kudos
Message 1 of 6
(6,120 Views)

Could you list your cDAQ chassis as well? 

0 Kudos
Message 2 of 6
(6,077 Views)
I am using a crio 9022 with an fpga backplane.

Thanks!
Daniel
0 Kudos
Message 3 of 6
(6,059 Views)

the ni link you refered is either moved or deleted (msg by ni). can you share the snapshot of your vi both fpga and on rt side to get a clear picture.

0 Kudos
Message 4 of 6
(6,045 Views)

Hi!

 

I've tried to compile the example but it had an error. Could you share the bitfile for proving it?

 

Thanks!

 

 

0 Kudos
Message 5 of 6
(5,111 Views)

@Tirmizi wrote:

the ni link you refered is either moved or deleted (msg by ni). can you share the snapshot of your vi both fpga and on rt side to get a clear picture.


Or just had an extra period....Here's the proper link: https://www.ni.com/en/support/downloads/tools-network/download.spi-and-i2c-driver-api.html

GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 6 of 6
(5,106 Views)