Close

Changing line frequency

A project log for VGA with Arduino

Yet another project trying to generate VGA signals using small avr mcu.

pavelPavel 02/10/2026 at 12:490 Comments

According to standard timings, line frequency for 640*480@60 Hz VGA signal should be 31.469 kHz, given the full frame, that aside from active area also contains blanking and sync, is 525 lines total. Line duration is thus 31.778 microseconds.

Here are results of my experiments with varying this line duration -- with total lines per frame fixed (525) this will effectively control the frame rate, with shorter line durations leading to faster refresh, and vice versa.

Using Arduino, closest approximation to this line duration can be done in steps of 0.0625 (1/16) of microsecond, as its clock rate is 16MHz. This way, the standard line duration would be 31.75 microseconds (508 clock cycles), and it gives us framerate of 59.993 fps, very close to 60.

With these parameters, the OSD shows the standard VGA:

-------

Investgation results:
this display screen seem to support frame rates between 49 and 78 frames per second for the frame height of 525 lines. It identifies resolution differently though, depending on framerate. At rates between 58 and 61 fps, and between 71 and 73, the identified resolution is stated as 640*480. At different rates the resolution is identified as 800*480, or 720*480, or even as 640*400. The 800*480 is the most probable one. The same framerate may be identified as different resolution, and I cannot find a reason for it. One example is during todays investigation -- I started with lower framerates, and at 49 Hz had 640*400 resolution. Then, after going through many variants for higher rates, came back to the same 49Hz, and now I have this screen identifying this rate with resolution of 800*480.

----

My goal is to find lowest resolution/framerate combo, so that I can make decent image generator using 74HC family logic (with such combo there would be lowest possible pixel clock frequency needed, and thus the signal will be easier to generate).

Discussions