Thursday, February 26, 2009

FPGA and VGA Screen

It wasn't easy... but i manage to put VGA to work on the nexys2. Main issues i found and solve: 1) Screen mode - My lcd doesn't like 640x480@60Hz ... it works but it complains (something like: please use 1440x900@75Hz) 2) Calculus issues - After change to 800x600@72Hz (50Mhz pixel clock - the clock of the fpga how nice... XD), i found out my pixel mapping was all wrong... the reason? Apparently a math error, mine of course, i just forgot that putting stuff closer isn't made first x_coor <= H_Counter - HP+HB that + was supposed to be a minus or ... just put it like (HP+HB) .. yeah, stupid me... >__>'' ... it's a bit sad, since this thing made me lost about 3h of work... 3) Syncronization issues - After try some extra logic stuff to calculate the color of a pixel, i found out that it might cause some little gliches .... not happy with them, i used a syncronization buffer In the end i just obtained a very nice VGA module it allows the use of an independent pixel mapper module, thanks to an extra sincronization module... it even allows the sheduling of pixels ahead of time... that way is possible to pipeline some work. If possible i'll try to show my VGA module in action in a near future (maybe a pong game, that sounds easy enough XD) And in case you're gonna ask how VGA signal works: Timings The best google result you will find (pdf) Any questions or ideas, just post below...

1 comment:

Petr Dobeš said...

Hi, i have nexys 2 500 and i want to make some stuffs with vga conector, but i dont know what do i have to connect where. Can you send me some simple source code examples how to easily make monitor connecting to my fpga board?