Forum Discussion
VGA Calculator Display using VHDL
All right, so I'm trying to make a floating point calculator using VHDL, and basically, I want to first make the display.
I want this calculator to display on a VGA monitor, and before I start configuring the calculating part of this project, I want to simply make a calculator actually show up on the screen with the function names. The functions will be Add, Subtract, Multiply, Divide, and Exponents (e^x). I'm using an Altera DE2 board, and I was wondering if anyone could help me with this? I really appreciate it! -CMN11 Replies
- Altera_Forum
Honored Contributor
Im sure we can help. Post what problems you're having and we'll see what we can do
- Altera_Forum
Honored Contributor
Well, the thing is, I have NO idea where to even start....
- Altera_Forum
Honored Contributor
Well, googling for VGA timings would be a start, or read up on VGA
http://en.wikipedia.org/wiki/video_graphics_array - Altera_Forum
Honored Contributor
hello there
In order to display data on VGA screen you need a VGA Controller module (there is planty free example on the net) and you need another module to deliver data that you want to display (here function names) then anothor module is required to do the calculation Good luck - Altera_Forum
Honored Contributor
Hey.
Ok, so I understand how VGA properly works, and I understand the modules I need. So, for this module to deliver data, how do I effectively have it display a calculator? That's my issue. I have made a VGA module, but now I'm trying to effectively display something. and I'm having a lot of trouble with that. - Altera_Forum
Honored Contributor
As you have a VGA controller, you'll have the timing counters running, so you know when you're in the visible part of the screen, and what pixel is currently being drawn. You just modify the pixel at the specific location to draw whatever colour pixel you want.
- Altera_Forum
Honored Contributor
--- Quote Start --- As you have a VGA controller, you'll have the timing counters running, so you know when you're in the visible part of the screen, and what pixel is currently being drawn. You just modify the pixel at the specific location to draw whatever colour pixel you want. --- Quote End --- But see, there's my issue! How do you modify EACH pixel? - Altera_Forum
Honored Contributor
easiest way would be to have a buffer storing the screen data. And then just read it out with your counters. Otherwise you need some vector approoach where you know the start and stop parts of a line.
- Altera_Forum
Honored Contributor
Ok, so I've been trying it the second way that you've been saying.
Could you explain a mock example of implementing it with a buffer storing the data? - Altera_Forum
Honored Contributor
You use a dual port ram. you use the x and y counters as the read address on the ram. on the write side, you can either refresh the entire ram every frame, or just update the pixels you want to modify on the screen. The downside to this is you need quite a bit of ram, while for video will probably need to be external ram.