Hello, I am Student from a University beginner in FPGAs, and I was doing a project with Nios II that uses a Altera DE2 Board to do some operations and save the results. The main ideia was to transmit to computer the results, but the USB take too much time to the FPGA.Now I am seaching a way to save those results at the SD card. But I couldn't find a way to store data in SD card. My idea was to create a .txt file that could receive at the end of each operation a value in the next line. If someone knows how save values in the SD card, I really appreciate your help, if you help send me.
When I transfer data, I use a very simple and relatively fast connection via GPIO and Labview. For that you need a Labview card and box (expensive but in most university labs available) with digital I/O pins and a clock input. Then you connect the I/O pins from Labview to some pins of the GPIO port.The transfer rate is 1Mbit/s for each connected data pin with my labview card. I tried to write to the SD card once, but failed when my SD card was not even recognized by the board. There is also no example to actually write to the SD card, only to read from it.
You could start with the DE2_115_SD_CARD demonstration project: it includes a function SDHAL_WriteData in the file sd_hal.c. You might be able to write using this function, if you find an SD card that is recognized by the board.I see that this demonstration is for the DE2-115 board; hopefully there is a similar demonstration for the DE2 board.
Awesome. Thanks for the advice I will have to take a look at the code. Do you know if there is a link on the altera website for the demonstration files? I can't seem to find them.What exactly is the trick to find an SD card that is recognized by the DE2 board? SDHC? Non SDHC? MicroSD into adapter? Certain brands?
What is the trick to finding an SD card that is recognized by the DE2 board? I've tried two cards now (PNY and Sandisk both 2GB) and neither one is being recognized.
Hello everyone! I really appreciate your help!David Pavid: I don't have a labview card, but its a nice idea! I adapted the code for the DE2-115 to run in DE2. I am running the program but I am having problems with the sd card that is not being recognized. I tested 2 SD cards, both microSD into adapters, and both fail. (1gb KINGMAX microSD and 8gb microSDHC Class4 that doesn't says the brand). Anyone has already tested a old simple card (32-128mb) and without adapters? I am going to contact terasic, if I get answers I post here.
The SD card (2 GB ) that came with the DE4 card can be mounted by the demonstration project design. Therefore I don't think that it is the size of the SD card.
Hello! I'm still trying to write a .txt file in SD Card. I searched a lot in internet but I couldn't find the solution!If someone knows a way please tell! Thank you!
Not to get too far off topic here but does anyone know of a way to write to an SD card using SPI (low level write)? As long as you know what data is being written you could extract it using MATLAB. Any thoughts?
Hello! I'm need a way to save data from fpga. I couldn't find a easy way to store in SD card. Does anyone have some idea to transfer data in a quicker way?
If you always run your system with a USB cable attached, you could use the host file system software component, that will let you read/write files on the PS from the embedded application. You need to run in debug mode though.
Hello! It's possible to write data in a pendrive/flash device? using USB host?PeteCSI: I'm trying to understand the FreeRTOS! When I get something I post here my results!
You'll need quite a lot of USB driver code in order to access a USB drive.You'll also need fairly trivial (by comparison) code to access the FAT32 filesystem on the device.
Larger devices are much more likely to have FAT32 (than FAT16). The crossover point is probably abut 128MB - although FAT16 can go higher.Nothing to stop you reformatting part of the device with FAT16 though.