03-28-2013 08:23 AM
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
03-28-2013 08:27 AM
Have you had a look at this?
Implementing SPI Communication Protocol in LabVIEW FPGA
03-28-2013 08:48 AM
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
03-28-2013 09:13 AM
Which SPI EEPROM are you trying to communicate with.
Why is your CS 16 bits wide??!!!!
03-28-2013 11:39 PM
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
08-05-2023 05:32 PM
Did you solve your problem of getting 255 in read byte line ??
08-05-2023 06:13 PM
@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