| View previous topic :: View next topic |
| Author |
Message |
zainian
Joined: 13 Jul 2010 Posts: 1
|
Posted: Tue Jul 13, 2010 2:20 pm Post subject: VGA using 10MHz Clock |
|
|
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. |
|
| Back to top |
|
 |
Case23
Joined: 19 May 2004 Posts: 54
|
Posted: Wed Jul 14, 2010 9:13 am Post subject: |
|
|
hi,
according to http://gtf.sourceforge.net/ the timing for 480 lines and 10Mhz Pixel clock is:
| Quote: | 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:
| Quote: | 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
|
|
|
| Back to top |
|
 |
Oneironaut
Joined: 21 Oct 2008 Posts: 63
|
Posted: Tue Jul 20, 2010 2:51 pm Post subject: Re: VGA using 10MHz Clock |
|
|
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 |
|
| Back to top |
|
 |
|