Forum Discussion
DE2 board VGA Dispaly
Hello All,
I am trying to use the board's SRAM to store an image and dispaly it on the screen. I designed a project using QuartusII and was able to manage the VGA dispaly timing. I used a reference design from John Loomis Webpage. http://www.johnloomis.org/digitallab/vgalab/vgalab3/vgalab3.html which is very helpful and nice. However, I am having a problem in dowloading the raw image file to the SRAM. My question is: How can I get a typical 640 X 480 bitmap image to be stored in the SRAM? I tried to use Terasic ImgConv, but it doesn't work :( I appricate your help. Thanks42 Replies
- Altera_Forum
Honored Contributor
Im sorry, im a total beginner and using the DE2-70 board trying to simply get a camera input to the board where it processes RAW to RGB and output to a LCD screen. can you post a video on youtube on how to do what you are saying? that would clear things up so much and im sure other ppl would love it as well! thanks! :D
- Altera_Forum
Honored Contributor
I wasn't able to run it, as my VGA port would only ouput seven colours.
And yeah, the video would be great!:D - Altera_Forum
Honored Contributor
Oh sorry´.
That code was made for DE2 board it has VGA DAC chip with 9 bits inputs for RGB each. What can I show in the video ?? I post the code :confused: Regards. Alberto. - Altera_Forum
Honored Contributor
maybe just the procedure on how to compile it in quartus? also im sorry i dont speak spanish. i dont really understand the comments in your code :(
- Altera_Forum
Honored Contributor
Hi.
Nothing special to compile it in Quartus, just Menu - Processing - Start Compilation. and no special preferences in Quartus selected, just by default values. Regarding the comments in Spanish, I will upload a translate table with the meaning of each comment...sorry, I forget about that comments. I've not too much time free now for realize a video, but I will, when I'll get some time free. Regards. Alberto. - Altera_Forum
Honored Contributor
that would be great :). i was just wondering if you wrote the entire code yourself? or did you use the sopc builder or nios? or altera monitor program? thanks :)
- Altera_Forum
Honored Contributor
Hi.
What are you talking about ayhoung ?? Did you download my code from the# 6 post of this thread ? I didn't use NIOS II for this, & Altera monitor program is usefull to check some NIOS II coding.... seems to be that you're misunderstanding what I did. Mi final target was to get 640 x 480 24 bit RGB picture on the VGA out, maybe I continue with this some day, if I'll have some free time. - Altera_Forum
Honored Contributor
Hello everyone,
Can anyone explain to me how to generate the R, G, B signals (used in DE2 board) from a gray image? let me explain. I have an array of pixels (representing a gray image) stored in the DE2 SRAM. How do I generate the 10-bit VGA_R,VGA_G, VGA_B needed from each pixel? How do I generate VGA_R, VGA_G, and VGA_B from a gray pixel that ranges from 0- 255? Please help - Altera_Forum
Honored Contributor
Sorry Monish If I understood correct your question, you have a gray scale image in the SRAM.
So, you couldn't generate a color image, but, you can get each pixel of the SRAM and then, assign VGA_R = image_pixel, assign VGA_G = image_pixel, assign VGA_B = image_pixel. You'll have only eight bits, but if first you shift the data two times left, you'll have a variable of 10 bits to assign to the VGA R,G,B wires. Your data will look like this: 10'b 1111111100 for a maximun pixel bright, so 256 differents levels, for this 10 bit D/A DE2 vga chip. - Altera_Forum
Honored Contributor
I tried it and the image appeared dark (not bright).
But please explain to me why shifting by 2?!!! Shifting by 2 is equivalent to multiplying by 4 which makes the range now from 0 --> 1023 (10 bits for VGA_R, VGA_G, VGA_B). Would the image still look the same after the shift? Many Thanks