LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using I2C and a conflict with digital I/O

I have a myRio and hence am using LabView real-time. I read an accelerometer and gyro from an external sensor using i2C. This works fine.

Then I add a PWM motor part. For the H bridge I require two logic outs.  I find that if I connect my H bridge logic outputs to A/Dioo that it stops the I2C working. Almost as if the Dio is in some way connected to the I2C, yet it is not.

In frustration I connected to the B port and it works fine again. Does using I2C in some way restrict you using the rest of the Port A? Seems a little odd. I had a problem in the past when I tried to use I2C and the FPGA at the same time - that's another story. Never resolved that either.

 

I made the I2C handle multiple opens (=True in the vi) in case it had something to do with that. didn't make any difference.

 

0 Kudos
Message 1 of 4
(1,998 Views)

my mistake. Found the error.

0 Kudos
Message 2 of 4
(1,961 Views)

Explain what error was so that people reading in the future can learn what you just learned!

Message 3 of 4
(1,957 Views)

I had forgot that I was using an interrupt and the interrupt was also using Dio0. Hence the conflict. The code was rather large and I went back to it after a time - that's why I forgot.

0 Kudos
Message 4 of 4
(1,954 Views)