Reply to topic  [ 10 posts ] 
Driving VGA with an FPGA 
Author Message

Joined: Wed Nov 28, 2012 2:48 pm
Posts: 58
Real Name: Dan
I've been busy for a while this year getting some landscaping work done for my wife. Today, though, I got back around to playing with an FPGA board for a while. I decided to try driving a VGA signal and was happy to see how easily it went together (five resistors and about 50 lines of Verilog).

Attachment:
P1050349.JPG


You do not have the required permissions to view the files attached to this post.


Sun Aug 25, 2013 4:42 pm
Profile

Joined: Wed Nov 28, 2012 2:48 pm
Posts: 58
Real Name: Dan
Just for fun, here's a picture of the raised bed gardens I built that have been taking away my time for playing with circuits.

Attachment:
P1050014.JPG


You do not have the required permissions to view the files attached to this post.


Sun Aug 25, 2013 4:46 pm
Profile

Joined: Wed Mar 07, 2012 10:40 am
Posts: 123
Real Name: Robert
Very cool!
One of the super-neat things about FPGAs is how easy it is to re-use designs. Once you design and debug a circuit, you are assured of being able to drop it in many different projects, even ones you haven't started yet--I remember the old days when you hand-wired a circuit that took many weekends--and then if you blew it up, you had to start all over. You don't even have to use the same FPGA or even same FPGA manufacturer--most verilog designs can go in anywhere and you only have to debug it once. Even better, it's like thingiverse--you can share designs. opencores.org!

Next up for your video is a character generator and line drawer... The fun is just beginning!

Bob


Mon Aug 26, 2013 5:33 pm
Profile

Joined: Wed Nov 28, 2012 2:48 pm
Posts: 58
Real Name: Dan
Yup, it has been fun so far. Last night I added a few more resisters to make a better digital-to-analog conversion for the RGB lines and got it up to 512 colors.

My next plans are to start working on a project to make a game of breakout that is entirely circuit driven (no processor).


Tue Aug 27, 2013 9:27 am
Profile
User avatar

Joined: Wed Jun 06, 2012 9:30 pm
Posts: 334
Real Name: Randy
Looks great Dan!!!!


Tue Aug 27, 2013 2:05 pm
Profile

Joined: Wed Mar 07, 2012 10:40 am
Posts: 123
Real Name: Robert
Quote:
My next plans are to start working on a project to make a game of breakout that is entirely circuit driven (no processor).


Hi Dan,
One caveat I would add is that some things actually are well suited for processors and are probably harder to do in an FPGA (right tool for the job and all that)--and a game algorithm and GUI usually falls into that category. My favorite solution is to design boards with both an FPGA and a processor--but the next best alternative is to implement a processor (or at least a statemachine) in the FPGA. I designed a UI statemachine that accepts a table of buttons and many tables of actions for each button. I select the appropriate action table depending on the current game state--this has proven very adequate and flexible for most of my projects.

Bob


Tue Aug 27, 2013 3:48 pm
Profile

Joined: Wed Nov 28, 2012 2:48 pm
Posts: 58
Real Name: Dan
agemoz wrote:
... some things actually are well suited for processors and are probably harder to do in an FPGA (right tool for the job and all that)

Yup. At the moment, though, that seems like a fun way to stretch myself a bit on digital design. I'm already very comfortable programming for microprocessors. Who knows - maybe I'll change my mind. For the moment, though, that's the plan.


Wed Aug 28, 2013 6:59 am
Profile

Joined: Wed Nov 28, 2012 2:48 pm
Posts: 58
Real Name: Dan
Finished my first pass at breakout on my FPGA board today. It's a bit bare-bones (no score display, etc), but it's fully functional: you get three chances to clear the board before it resets back to a full set of bricks. Writing it in Verilog was certainly a bit different than C versions. I'm sure what I have is far from the most efficient design (lots of copy/paste and extra computations just because I was being lazy). It was fun to get it up and running, though. Now I'm toying around with either working to make it more efficient (reduce the number of logic gates used), or working to add control via a PS/2 mouse instead of the tactile buttons on the breadboard. I'm leaning towards doing the PS/2 work, though, because my kids have a hard time manipulating the tactile buttons (it's less intuitive for them) and it would give me an excuse to get some practice with bidirectional pins.

Here are some pictures, just for fun (one of a clean board at the beginning of the game, the next after a few rounds have gone by and some bricks have been cleared)
Attachment:
P1050365.JPG

Attachment:
P1050367.JPG


You do not have the required permissions to view the files attached to this post.


Sat Aug 31, 2013 7:37 pm
Profile

Joined: Wed Nov 28, 2012 2:48 pm
Posts: 58
Real Name: Dan
Here's the Verilog source, in case anyone's curious. Again - it's quite sloppy (especially the math in the game logic - pretty inefficient way of handling things), but I'm ok with that considering it was only about the second thing I've done with Verilog.


You do not have the required permissions to view the files attached to this post.


Sat Aug 31, 2013 7:39 pm
Profile
User avatar

Joined: Wed Jun 06, 2012 9:30 pm
Posts: 334
Real Name: Randy
Great work Dan! I hope to score some time in the near future to look at the code.


Mon Sep 02, 2013 3:28 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 10 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software