Measuring and analyzing video signals

Basic measuring techniques

What tools are needed

Oscilloscope is a very nice tool to check what goes in sync signal lines and RGB signal wires itself. The sync signals should look like this:

Or this:
This applies to both HSYNC and VSYNC signals. From the oscilloscope picture you can easily read the approximate timign details of those signals (time between two pulses, sync signal width).

If you just want to know the frequencies and want to knoe them very accurately connecing a frequency counter to the sync signal wire will do this.

Measuring the VGA card signals

When measuring the signals form VGA card directly the easies wway to ground your measuring equipment to the signal is to connect the measuing equipment ground to PC metal case or any of the grind pins in VGA connector.

To get information on HSYNC signal, connect the measuring equipment signal input to VGA HSYNC pin 13. If you use high impedance oscolloscope probe or frequency counter input, you can connect it directly to the VGA card output and even connect it in parallel with the monitor input. In VGA cards, those sync signals are TTL signals, usually in around 2..4Vpp votlage range. To get the information on VSYNC signal, connect the measuring equipment signal input to VGA VSYNC pin 14.

Normal basic multimeter is not much of use in measuring video signals. You can measure the sync signal polarities with it, but that's about where it can be used (unless it has a frequency counter in it).

How display devices detect different resolutions

Many display devices designed to display computer images must adapt their operation to different screen resolutions sent by computer. Usually this adaptation is done so that the monitor or other display device has separate settings stored for different screen modes and the display device first identifies what kind of signal is coming in and then uses settings suitable for it.

Using sync signal polarities

The oldest method for different resolutions detection used in EGA and VGA displays is using sync polarity information to tell what kind of signal is sent to monitor. VGA card originally used this method for telling monitor when to be in 350, 400 or 480 line mode. Many monitors used the remaining signal polarity combination to detect the high resolution modes. Standard VGA screen modes and sync polarities used in them:

Horizonal Dots         640     640     640
Vertical Scan Lines    350     400     480
Horiz. Sync Polarity   POS     NEG     NEG
Vert. Sync Polarity    NEG     POS     NEG
For higher resoutions than this usually both sync signals are positivd active (but also other combinations can exist in high resolution modes).

This was used in some old VGA monitors, but this method is quite obsolete nowadays.

Using length of the sync pulse

Some ICL monitors have detected the screen mode from the length of the vertical sync pulse. The monitor electronics count how many scanline times the vertical sync pulse was active (the settings in use are selected from info if the verical sync pulse lasts more than 7 scanlines or shorter time). This was used in some old VGA monitors, but this method is quite obsolete nowadays.

Detecting the screen resolution and other setting from signal

Nowadays monitors have controlling microprocessor and it is not too hard to make a program which extracts frame rate, horizonal frequency, interlace and other necessary info from the sync signals. By detecting the signal types and their timing lots of information on incoming video can be identified.

If you measure the time between two HSYNC pulses to occur, you get the horizonal scanline time. If you need to display the frequency somewhere, you can calculate it from that time frequency = 1 / horizonaltime). Same thign can be done to the VSYNC signal to get vertical timing information of video signals. This gets you the information of screen refresh rate.

If you need to check if the screen mode is interlaced or not this can be detected in normal VGA sync signals by checking if the VSYNC timing in relation to HSYNC pulses. If those start at sround same time always, you have non-interlaced screen mode. If the VSYNC starts in every other frame at same time with HSYNC and at other frames in the middle between two HSYNC pulses you know that the input signal is interlaced.

Detectling the video picture resolution is a little bit trickier. You can get to know the total number of scanlines on the video frame just by counting how many HSYNC pulses occur in one frame. This can be done by starting a HSYNC pulse coutner when VSYNC goes active and stopping it when it goes active again. Now you have the information of screen resolution here. The number you got there is the number of visible scan lines + borders + sync time. For converting this to visible picture Y resolution you can either try to match the number of total lines to ones used in standard video modes. Then you find a match, you have quite good quess that this is the Y resolution used. Other method is to take the total number and substract fre tens of lines form it and then find nearest standard Y resolution which matches to this.

For X resolution for an arbitary video signal there is no foolproof method for detecting which is the actual X resolution used by just looking at the signal in video connector. The best general idea is to first measure the Y resolution and then just quess that the X resolution is on of those from standard XY-resolution pairs (like 640x480, 800x600, 1024x768, 1280x1024 etc.) If you have some access to the pixel clock on the card, then you can calculate video mode horizonal total (X-resolution + borders + sync) by counting the pixel clock tickles from start of one HSYNC pulse to start of another HSYNC pulse.

Tomi Engdahl <[email protected]>

Back to VGA2RGB FAQ home page