VGA using 10MHz Clock

Requests, not necessarily related to fpga4fun...

VGA using 10MHz Clock

Postby zainian » Tue Jul 13, 2010 2:20 pm

Warning... newbie alert.

I'm trying to create a VGA signal for a 640x480 monitor @ 60 Hz using a non-standard 10 MHz clock (not the standard ~25MHz clock normally used for that resolution).

I know the horizontal sync frequency should work out to be 31.25 kHz with a 60 Hz field rate; however, I'm a bit at a loss as to how to calculate the front porch, sync pulse, and back porch for the hsync and vsync to make it work at this clock speed. Every example online only uses a 25MHz or faster clocks.

Thanks in advance.
zainian
 
Posts: 1
Joined: Tue Jul 13, 2010 2:05 pm

Postby Case23 » Wed Jul 14, 2010 9:13 am

hi,
according to http://gtf.sourceforge.net/ the timing for 480 lines and 10Mhz Pixel clock is:
1: [H PIXELS RND] : 272.000000
2: [V LINES RND] : 480.000000
3: [V FIELD RATE RQD] : 60.000000
4: [TOP MARGIN (LINES)] : 0.000000
5: [BOT MARGIN (LINES)] : 0.000000
6: [INTERLACE] : 0.000000
7: [H PERIOD EST] : 33.506584
8: [V SYNC+BP] : 16.000000
9: [V BACK PORCH] : 13.000000
10: [TOTAL V LINES] : 497.000000
11: [V FIELD RATE EST] : 60.050060
12: [H PERIOD] : 33.534538
13: [V FIELD RATE] : 60.000004
14: [V FRAME RATE] : 60.000004
15: [LEFT MARGIN (PIXELS)] : 0.000000
16: [RIGHT MARGIN (PIXELS)] : 0.000000
17: [TOTAL ACTIVE PIXELS] : 272.000000
18: [IDEAL DUTY CYCLE] : 19.939638
19: [H BLANK (PIXELS)] : 64.000000
20: [TOTAL PIXELS] : 336.000000
21: [PIXEL FREQ] : 10.019521
22: [H FREQ] : 29.820002
17: [H SYNC (PIXELS)] : 24.000000
18: [H FRONT PORCH (PIXELS)] : 8.000000
36: [V ODD FRONT PORCH(LINES)] : 1.000000

# 272x480 @ 60.00 Hz (GTF) hsync: 29.82 kHz; pclk: 10.02 MHz
Modeline "272x480_60.00" 10.02 272 280 304 336 480 481 484 497 -HSync +Vsync


if you dont have a fixed requirement, i would propose 320 x 200 pixel with line doubleing:


1: [H PIXELS RND] : 320.000000
2: [V LINES RND] : 400.000000
3: [V FIELD RATE RQD] : 62.000000
4: [TOP MARGIN (LINES)] : 0.000000
5: [BOT MARGIN (LINES)] : 0.000000
6: [INTERLACE] : 0.000000
7: [H PERIOD EST] : 38.850456
8: [V SYNC+BP] : 14.000000
9: [V BACK PORCH] : 11.000000
10: [TOTAL V LINES] : 415.000000
11: [V FIELD RATE EST] : 62.023430
12: [H PERIOD] : 38.865139
13: [V FIELD RATE] : 62.000000
14: [V FRAME RATE] : 62.000000
15: [LEFT MARGIN (PIXELS)] : 0.000000
16: [RIGHT MARGIN (PIXELS)] : 0.000000
17: [TOTAL ACTIVE PIXELS] : 320.000000
18: [IDEAL DUTY CYCLE] : 18.340458
19: [H BLANK (PIXELS)] : 64.000000
20: [TOTAL PIXELS] : 384.000000
21: [PIXEL FREQ] : 9.880320
22: [H FREQ] : 25.730000
17: [H SYNC (PIXELS)] : 32.000000
18: [H FRONT PORCH (PIXELS)] : 0.000000
36: [V ODD FRONT PORCH(LINES)] : 1.000000

# 320x400 @ 62.00 Hz (GTF) hsync: 25.73 kHz; pclk: 9.88 MHz
Modeline "320x400_62.00" 9.88 320 320 352 384 400 401 404 415 -HSync +Vsync
Case23
 
Posts: 75
Joined: Wed May 19, 2004 9:41 am

Re: VGA using 10MHz Clock

Postby Oneironaut » Tue Jul 20, 2010 2:51 pm

Keep in mind that you will also end up with vertical "banding" on any LCD monitor as well. If you want 320x240 or 320x480 without banding, you have to divide 25.175MHz in half. 25.000 MHz is NOT close enough to avoid banding.

If this is not a concern, you could even drive 256x240 at 10MHz into a 640x480 screen. This is what I was doing.

Your image will be fine on a CRT though.

Brad
Oneironaut
 
Posts: 67
Joined: Tue Oct 21, 2008 6:56 pm


Return to Help requests