LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

MyRIO FPGA SPI Communication issue

 Hello all,

 

I am trying to run my first FPGA project using a myRIO and SPI protocol from an ADC. I am only concerned with reading data from the ADC. I found this link that was posted a few years back with a modified program for myRIO. 

 

https://forums.ni.com/t5/Labvolution/myRIO-FPGA-SPI-Communications/ba-p/3484859

 

I have slightly modified the project to accommodate the pins that I will be using. I have also created a master clock (MCLK) used to send to the ADC to control sampling rate. This is executing just fine. My issue is that I am not generating the SCLK that is needed in order to read/write data for SPI. I know I can configure in the cluster from the front panel of the RT host or the FPGA top level. I am just not seeing anything except noise on my o-scope. I am not getting any errors when compiling the program and my hardware is wired correctly. I am stumped after trying to figure out what I am missing. Could somebody please take a look at this and see if I have made a small error somewhere? Any help will be greatly appreciated.

 

Thanks

0 Kudos
Message 1 of 5
(3,414 Views)

Why dont you use the onboard ADC on the myRIO?

Does the ADC peripheral you're using require initialization (that is, a few wake-up and configuration messages on the SPI bus)?

Do you have a Digital Logic Analyzer to probe the communication bus? I'd highly recommend it for these types of applications......

Dan Haugen
Certified LabVIEW Developer
CLD Instructor
Message 2 of 5
(3,366 Views)

Thanks for the response.

 

I am using a synchronous 8 channel ADC (TI ADS1278) that is required for my design parameters. The ADC is on an evaluation kit so it does not require any configuration, all configuration is done by hardware switches on the board. I do not have a digital logic analyzer only an o-scope. I believe my issue is in the setup of the port for the MyRIO. The example was originally created for a Single board RIO and modified for a myRIO. I'm not sure how I can verify the Port is being configured properly. 

 

Thanks for any help.

0 Kudos
Message 3 of 5
(3,353 Views)

Make sure when initializing your SPI port you have the correct baud rate. How does the other device work? Does it just constantly spam the input ADC value over the SPI bus? Maybe it needs a chip select pin that was forgotten in the carry-over from SBRIO to myRIO (some SPI devices require the 'chip select' pin when there are multiple devices on a SPI bus)

Dan Haugen
Certified LabVIEW Developer
CLD Instructor
Message 4 of 5
(3,332 Views)

I also encountered the same problem, may I ask whether you solved this problem?

0 Kudos
Message 5 of 5
(1,993 Views)