Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

I2C bus monitoring

Hello all, 

I have a RIO evaluation kit and I use 2 of its digital I/O to control an I2C bus as a master and now I have many I2C slave devices which i want to get a data from each one by writting the address of a slave device and draw it as graph !! 

anyone can help me please .. 

may be at first how to detect the start condition where the serial data (SDA DI/O) and serial clock (SCL other DI/O) are both high then the SDA goes low after it the SCL goes to low ... and after the start condition the address of the slave come and data and so on...

 

thanks in advance   

 

Mustafa 

0 Kudos
Message 1 of 4
(7,155 Views)

Hallo Mustafa,

 

Verify the digital IO selected for the I2C bus is what is needed.

 

This could help you  I2C Implementation in LabVIEW FPGA

 

For instructions on implementing the code see "How to Get Started with this Code.pdf" in the documentation folder in the attached zip file

 

0 Kudos
Message 2 of 4
(7,076 Views)

 

 

Here are some specific resources for SPI and I2C communication on LabVIEW FPGA:

 

SPI and I2C Driver API - National Instruments

https://www.ni.com/en/support/downloads/tools-network/download.spi-and-i2c-driver-api.html

 

Reference example-Simple I2C Communication to DAC IC using LabVIEW FPGA

https://forums.ni.com/t5/Example-Code/Simple-I2C-Communication-to-DAC-IC-using-LabVIEW-FPGA/ta-p/399...

 

Hope this helps!

0 Kudos
Message 3 of 4
(7,075 Views)

Thank you for your kind reply sir hsm78.. I couldn't apply the I2C core which is in the link you mentioned..

 

actually I build a simple VIs inorder to save the digital input from the SDA and SCL into an arrays  but it doesn't gives good result can you see the code and if any one has an idea on how to make monitoring i mean to give an address then check when this address come in the i2c bus then read the data after it. 

 

thanks in advance

 

 

Download All
0 Kudos
Message 4 of 4
(6,746 Views)