- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm using an Altera DE1 to implement a snake game on it. I developed a 4-bit counter, on my verilog code, to count the times the snake eats a dot. How can I save this 4-bit digit into the SD card?
Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You could, but if you wrote all the code yourself it might be bigger than the snake game. How about the 7 segment display, or the serial port?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- You could, but if you wrote all the code yourself it might be bigger than the snake game. How about the 7 segment display, or the serial port? --- Quote End --- I'm using the 7 segment display to display the score of the user. But here is the thing, every time the user press reset the system should show the top 3 highest scores. I was thinking on saving these scores into the SD card and load them from it to display the scores on the 7 segment. Can I save the data displayed on the 7 segment to the SD card or is there a better option, other than the SD card, to save the scores?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The SD card and the FLASH are your only non-volotile on-board options. I'd suggest the SD card could be considered easier to implement.
This page; "how to use mmc/sdc (http://elm-chan.org/docs/mmc/mmc_e.html)" covers basic access of an SD card. I'd suggest it need not be very big. An SPI host is something an FPGA will easily accommodate. Cheers, Alex- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I was assuming it was to be written to a file on the SD card. Correctly handling a file system would be hard.
If you just want to use the SD card for raw data that doesn't need to be read by anything else, then it isn't that hard to read/write a block of data. If you have NAND flash or EEPROM, on your board, that might be easier than the SD card.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page