Forum Discussion
Altera_Forum
Honored Contributor
17 years ago[DE2-Help] Putting images in SRAM or FLASH, then displaying them on VGA Output
Hello everyone,
I am having trouble understanding how to first of all put images into memory (a.k.a. how do I upload them from my computer) and then being able to access them using Verilog in order to display them using the vga controller. My vga controller works and I am able to draw things manually but it is hard to create complex designs this way. AKA. Image 1-4 are in memory If(state == 00) draw image 1 at some x & y location else if(state == 01) draw image 2 at some x & y location and so on.. If anyone could help me it would be most appreciated. Thanks, Pachu Edit: - Also.. I do not want to implement this using NIOS unless that is the only way.15 Replies
- Altera_Forum
Honored Contributor
Hi Pachu.
When I get the image through serial port, it get saved into SRAM, but not forever, since SRAM lost their data when it haven't power supply. You could use FLASH for this, but I think this memory will not be enough fast to transfer the data from it to VGA controller, maybe you would need some code for pass the data from FLASH to SRAM first. Also you could save in the FLASH more than one image, and then, copy only one to SRAM at a time to show it. Here's the top level code, that I used for this. Be advice I'm a very beginer in this, so the coding is not very academic, and poor. (but works). - Altera_Forum
Honored Contributor
Hi Pachu.
Read in this thread my last post, maybe it could help you. http://www.alteraforum.com/forum/showthread.php?t=3094 - Altera_Forum
Honored Contributor
Hi BTXSistemas,
Thanks for replying, but that does not really help me, I guess what I am asking for is an explanation on how to go about even getting the images into memory and how I can access multiple images and only display them when/where I want. Thanks, Pachu - Altera_Forum
Honored Contributor
Pachu.
What I did ( in example mode) is to upload an image from my computer to the DE2 board using serial port, then I save it in SRAM, and then I show it in the VGA, at 320x240 in 24 bit color. I think it's only difeers from your needs, that you want more than one image. I can share the verilog code here, although all quartus project is a bit heavy to post. Then you can take a look at the code to know how I did it.- KarthikeyanRavi
New Contributor
I am having the same task. I need to read the RGB pixel value from the sram. But I'm having some doubts , could you provide me the verilog code. My email id : [email protected]
- Altera_Forum
Honored Contributor
Sure that would be great! When you store the image using the serial interface does that image get placed in SRAM? Does it store forever? Or will I need to restore everytime game is run? (Ideally it should be store once for my case and then only restore if I need to change the image).
- Altera_Forum
Honored Contributor
--- Quote Start --- Pachu. What I did ( in example mode) is to upload an image from my computer to the DE2 board using serial port, then I save it in SRAM, and then I show it in the VGA, at 320x240 in 24 bit color. I think it's only difeers from your needs, that you want more than one image. I can share the verilog code here, although all quartus project is a bit heavy to post. Then you can take a look at the code to know how I did it. --- Quote End --- Hi, can send it to me?? I am having this problem now. My email is Thank you very very much. - Altera_Forum
Honored Contributor
kirakiat.
Look for that code in this thread please. Cheers. Alberto. --- Quote Start --- Hi, can send it to me?? I am having this problem now. My email is Thank you very very much. --- Quote End --- - Altera_Forum
Honored Contributor
--- Quote Start --- kirakiat. Look for that code in this thread please. Cheers. Alberto. --- Quote End --- Do you have any idea that can send image from Matlab to DE2 board? I really need to work on it. Thank you very much. - Altera_Forum
Honored Contributor
I really don't have any ideas about Matlab, I never use it.
- Altera_Forum
Honored Contributor
do you know hw to get image from serial port?? gt any example? Thank you very much,