# How do I calculate needed pixel clock frequency?

If I want to have a resolution of X * Y pixels, updating in frequency f. How do I calculate the pixel clock speed?

Example: 1280 x 1024 @ 85Hz usually have a pixel clock of 157.5 MHz, but how do I calculate the needed pixel clock?

Need to know to select DAC and DSP.

Edit: Usually the Front porch is: 16 pixels 1 line, Synch width: 144 pixels 3 lines. So this is a total of 1688 x 1066 @ 85Hz. But, still the pixel clock formula should be the same regardless of the extra lines and pixels.

There is more pixels in the video signal than just the x * y * refresh_rate would imply. Back in the bad old days of CRT's, it would take time for the electron beam to move from the end of the current line to beginning of the next. Likewise, it would take time for the beam to move from the bottom of th screen to the top for the next frame. The time it took was built into the video signaling standard, and essentially took the form of pixels that are never seen.

Without knowing the info on these blank pixels (sometimes called "overscan"), you cannot calculate the pixel clock required.

The best way to figure this stuff out is to Google for the approximate video standard you're trying to do, or look at the datasheet for the screen you are trying to drive.

• fwiw, the bad old days of CRT video (at least, in the U.S.) can be understood by googling RS-170A, the signal spec that gave the timings for the non-display parts of the signal. however, that system was only good for about 320 x 200 @ 60, so expect things to have moved on a bit. – JustJeff May 30 '11 at 13:48
• I have updated the info. Still the formula should be the same regardless of the number of lines and pixels. – Max Kielland May 30 '11 at 14:06
• Ahh, okay, when I added the extra lines and pixels the math adds up correctly :) 1688 x 1066 x 85 = 152,94968 MHz – Max Kielland May 30 '11 at 14:08

This depends also on what kind of display you want to drive. Usually the standard equation for pixel clock is this-

Pixel clock = Horizontal_Active_Resolution X Vertical_Active_Resolution X Refresh_Rate X (1+ Blanking Period %).

Horizontal_Active_Resolution X Vertical_Active_Resolution X Refresh_Rate is the display resolution which in your case is 1280 X 1024 X 85.

Now since you want to calculate exact pixel clock required for this display, you must know the %blanking period. Usually it lies between 3% to 40% for most of the display.

The % blanking period is total time in which there is no active image being presented on the screen as suggested above in these answers also. The image below shows in detail regarding display size and blanking period which consists for both horizontal and vertical fields. In order to calculate the exact pixel clock you must know these details-

So effectively your pixel clock in this figure will be (HPW+HBP+HACT+HFP) X (VPW+VBP+VACT+VFP) X Frame Rate.

The Blanking period will consist of horizontally as horizontal pulse width (HPW), horizontal back porch (HBP) and horizontal front porch (HFP). It will also consist of vertically as vertical pulse width (VPW), vertical back porch (VBP) and vertical front porch (VFP).

All these details can be found in Display Datasheet.

If you have a particular display you need to drive, then it is best to look for a spec for that display. Modern displays are reasonably forgiving, however.

There are VESA standards for calculating display timings. The more recent standard is the CVT; it was preceded by the GTF. If you have access to a machine with X.org, there are command-line utilities to calculate the timings: GTF CVT. You may be able to get Excel calculators from VESA with a free registration, I haven't tried it though.