Forum Discussion
Altera_Forum
Honored Contributor
15 years agoReading SD Card on DE2-70
Hello,
I am doing my thesis on image processing and I need to input an image and it seems that sd card is convenient way to input an image file. Has anybody achieved to read sd card ? I read many topic here but no solution has been provided. I use SpiMaster core from OpenCores but as I am new to FPGAs, the interface is a misery for me. If anyone could share a piece of code, that would solve a lot of questions for me Luya15 Replies
- Altera_Forum
Honored Contributor
Using SPI should be easy i guess, mine is using SPI, and the read function works well. I used the SPI interface given in the DE2_SD_AUDIO project example by altera/terasic.
- Altera_Forum
Honored Contributor
It use NIOS I assume. I don't want to use it because I don't know how I am going to pass the sd-card data to vhdl side code. Also I didn't understand how to generate an sopc instance without CPU core.
- Altera_Forum
Honored Contributor
OK, I did it. It was really simple :rolleyes:
Now I am trying to display the image on screen. - Altera_Forum
Honored Contributor
Hi. I'am doing a similar project in pure verilog (in de2-115) and i want to read an image form sd card and show it to display. Can you give me some advise how to do it
thank you - Altera_Forum
Honored Contributor
--- Quote Start --- Hi. I'am doing a similar project in pure verilog (in de2-115) and i want to read an image form sd card and show it to display. Can you give me some advise how to do it thank you --- Quote End --- I gave up doing it but I remember I used this for reading content from sdcard and it worked: http://stevenmerrifield.com/tools/sd.vhd - Altera_Forum
Honored Contributor
Thank you..
- Altera_Forum
Honored Contributor
--- Quote Start --- OK, I did it. It was really simple :rolleyes: Now I am trying to display the image on screen. --- Quote End --- Hi luya, I'm doing a similar project (SoC on DE2-70 FPGA board) which relates to reading an image from SD Card and display on screen. And I'm quite new in FPGA. Can you help me ? my email: [email protected]. Can I have yours ? - Altera_Forum
Honored Contributor
--- Quote Start --- Hi luya, I'm doing a similar project (SoC on DE2-70 FPGA board) which relates to reading an image from SD Card and display on screen. And I'm quite new in FPGA. Can you help me ? my email: [email protected]. Can I have yours ? --- Quote End --- Hello Mike, I cannot help much, sorry. I explained above. But if you are also going to do image processing on FPGA, there were some nice projects for DE70 on internet. One of them did sobel edge detection in real time but from camera, not sdcard. That's all I can share with you. Good luck with your project. Luya - Altera_Forum
Honored Contributor
Thanks for reply, luya
In the code sd.vhd you shared above, I don't know the frequency of clock for SPI, so, I connect the clk that should be twice the SPI clock, to iCLK_50 of DE2-70 board. But the result is not the expected one (I let data out display on the red LEDR for monitoring). Can you explain more about how you make sure that code work ? Thank you very much :) - Altera_Forum
Honored Contributor
Hello Mike,
I hope someone will see your question and answer, but not me. I changed my project, just because I couldn't read the image file from SD Card.. Is it possible to simulate with modelsim and then debug, maybe?