From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

MyRio i2c slave

Solved!
Go to solution

Hi everyone,

I'm having some troubles to get my PIC (18F248) to communicate with my MyRio 1900 Board through i2c.
In my case, the PIC must be the master and the MyRio the slave.
Does anyone know how to make the MyRio act as a slave on i2c bus ? (with FPGA for example)

Thank you !

0 Kudos
Message 1 of 3
(2,656 Views)
Solution
Accepted by topic author antoinelg

Hi Antoine,

 

It would be helpful if you gave us more details on the issue you are facing. Have you done anything so far ? If you have written some code and the code does not work, feel free to post it here so we can give advice, as well as a detailed description of the issue you have.

 

If you do not have any code yet, then you can have a look here : https://forums.ni.com/t5/Examples-and-IP-for-Software/I2C-IP/ta-p/3491271

 

This code is not written from with the myRIO in mind, but the FPGA generally does not change a lot from platform to platform. You should be able to modify it to fit your needs. Here us an example that uses this code :

https://forums.ni.com/t5/Examples-and-IP-for-Software/I2C-Example-for-the-NI-PXIe-5644R/ta-p/3491762

 

Thomas



0 Kudos
Message 2 of 3
(2,609 Views)

Thanks ! 
Actually I had found this code before but I thought it hasn't been updated for my Labview version (2017) since I wasn't able to download it in VI Package Manager, thanks to you I find it has been and it works now !
I had a bit of code but it only worked for detecting a start or stop condition, I was stuck with the adress detection part (and data detection actually), Bit out was always false, never true... 
image.pngimage.png
Thanks a lot, no need to reinvent the wheel !

0 Kudos
Message 3 of 3
(2,598 Views)