Forum Discussion
Altera_Forum
Honored Contributor
18 years agoCheck out vga_ram.vhd in this zip file:
http://www.divshare.com/download/1238611-bbc I didn't write the code, but I know it is a VGA controller that uses RAM on a Spartan-3 board. vga_ram.vhd appears to contain the code that generates the VGA vsync and hsync timing. Basically, you use the pixel clock to increment a horizontal counter, and use the horizontal counter to increment a vertical counter. As long as the two counts are within range (say 0 < h_count < 640 and 0 < v_count < 480) then provide valid data.