LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

I2C timing Problem

I am implementing an I2C protocol on labview fpga. I am using cRio 9074 and digital I/O module 9401 for this purpose. Since SDA line is a bidirectional line, I am using a method node to set line directions and the node is taking around 100 us to get executed (as per below code in the figure).

 

I wanted the SCL speed to be 100 kHz, i.e 10 us cycle time for one bit tranfer. So how do I do it when this, when the method node is taking so much of time (nearly 10 times).

Download All
0 Kudos
Message 1 of 2
(2,742 Views)

This is my code if it could help figure out what i needed. This code is for reading values from three devices simultanously (an accelemeter, gyro and magnetometer) using I2C protocol. 

 

Please check the code and help me figure out how to access element faster. The main mess is with the "set line direction" method node, which is taking long time to execute and stoping me to have a i2c speed of 100 kHz or 400 kHz.

 

Awaiting for a prompt response.

 

Thanks & Kudos in advance

0 Kudos
Message 2 of 2
(2,693 Views)