LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

FPGA SPI for Single Board RIO

Hello all,

 

I am working on NI sbRIO-9605.

I am using DIO pins of Rio Mezzanine Connector on sbRIO board as FPGA I/O to implement SPI protocol over FPGA.

Through these DIO pins i have connected my SPI eeprom.

If anybody can provide me the code for the same type of implementation(DIO pins connected to any SPI IC),it would be of great

help to me.

 

Please help!

Thanks a lot

anurag

 

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

Have you had a look at this?

Implementing SPI Communication Protocol in LabVIEW FPGA

http://www.ni.com/white-paper/9117/en


CLA CTAChampionI'm attending the GLA Summit!
Subscribe to the Test Automation user group: UK Test Automation Group
0 Kudos
Message 2 of 7
(4,004 Views)

Hi aCe,

 

I have checked all the possible tutorials.

I have already implemented a code for my SPI eeprom using:

      SPI Dual Port Example and SPI FPGA drivers.But my code is not working(not reading/writing)

Also i used following tutorial:

http://www.ni.com/white-paper/8359/en.

I am attaching my code also.

 

Thanks.

Please Help!

anurag

0 Kudos
Message 3 of 7
(3,996 Views)

Which SPI EEPROM are you trying to communicate with.

 

Why is your CS 16 bits wide??!!!!

cs.png


CLA CTAChampionI'm attending the GLA Summit!
Subscribe to the Test Automation user group: UK Test Automation Group
0 Kudos
Message 4 of 7
(3,979 Views)

Hi aCe,

 

Thanks a lot for your fast response.

 

I am trying to communicate with 25AA010A SPI EEPROM.

I have taken 16 CS pins(as a group) for each port but i am connecting only one slave(EEPROM) to DIO16 for port 0.

 

I am giving value of CS as 0 which  which select the eeprom connected.

 

Also i am able to read/write eeprom but ocassionally.

i am trying to write/read 2 bytes at a time.

Say->i have written 2 bytes->1,2 at address 0 and then i read back 2 bytes from same address->it gives 0,0 or 255,255 or some random values or sometimes correct values 1,2 also.

 

I am unable to analyze the behaviour.

 

Please help!!

anurag

0 Kudos
Message 5 of 7
(3,967 Views)

Did you solve your problem of getting 255 in read byte line ??

0 Kudos
Message 6 of 7
(958 Views)

@AymanShama wrote:

Did you solve your problem of getting 255 in read byte line ??


I hope you realize that you are responding to a post that is 10 years old!  Please start a new Post.  Describe what you want to do, what you have tried, what version of LabVIEW (year and whether 32-bit or 64-bit) you are using, what hardware you are trying to implement a SPI protocol.

 

You should also attach the code you are trying to develop.  DO NOT ATTACH PICTURES OF CODE.  We cannot edit ("improve") or try out your code in "picture" form.  

 

Many of the more experienced LabVIEW participants on this Forum are not running the "latest" version of LabVIEW, so if you are running LabVIEW 2022 or 2023, please "Save for Previous Version" and specify LabVIEW 2019 or 2021 when you attach code.

 

Bob Schor

0 Kudos
Message 7 of 7
(947 Views)