tutorial 4 (vga)

I just finished Toni’s VGA tutorial and I had a blast; I’m getting good at converting VHDL to Verilog.  Next I think I’ll find a RAM tutorial and one for sound.  This one didn’t give me too much trouble, but there are a few differences between his tutorial and what I ended up coding.

First, my VGA display has a different resolution than the one used, so I had to find the specifications and adjust them for my monitor.  Second, the DE2 board has more output pins dedicated for VGA use; these differences are slight but you won’t get a picture without them.  The code comments have the specifics.

One more thing: I don’t use VHDL so I had a little hang-up trying to implement the procedure he uses for drawing the squares.  Then I found the ‘task’ keyword for Verilog, which accomplishes the same thing just with slight syntax changes.  All the code works great.  The PLL generated in QSYS will have to be adjusted for your monitor and you may have to use a different clock input (my case was 50Mhz).

Code here: https://github.com/christopherhays/my-modules/tree/master/tutorial-4

The tutorial I am working with:

His video explains the concept and specifications behind VGA so I won’t repeat that information here. I’ve decided to stop posting my code here; I’ll just leave links to GitHub.  Certain modules didn’t want to format correctly and there didn’t seem to be any reason behind it: it just wouldn’t work sometimes.  I don’t want to spend hours chasing that bug so the links will have to do.  All the code is working great feel free to test it out.

A picture of the squares on an old monitor:

2017-01-06-12-02-50

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s