Hi, I'm new in fpgas.I've been researching about vga timings for a few days, but all information I've found it's confusing. I will try to explain what I've learn: HS,VS signals are active low. HS tells the monitor to begin a new line, VS tells the monitor to begin a new frame. Before activate HS ,monitor must be in blanking mode (front porch),before draw another line monitor must leave blanking mode (back porch). The same for VS. There is an active time to draw all line pixels. I'm correct? I don't understand timing. For example if back porch takes 4us and active time takes 25 us in a 640x480 screen Is the monitor expecting this timings? I mean , if I stay 8 useconds in back porch will the monitor wait for me? , or will it begin to draw the line after 4us? Is the monitor reading RGB data every (25us/640)? I've read some timings in http://www.epanorama.net/documents/pc/vga_timing.html Thanks ins advance, Jordi
help with VGA timings
Started by ●February 19, 2006
Reply by ●February 19, 20062006-02-19
Jordi wrote:> Hi, > I'm new in fpgas.I've been researching about vga timings for a few > days, but all information I've found it's confusing. I will try to > explain what I've learn: > > HS,VS signals are active low. HS tells the monitor to begin a new line, > VS tells the monitor to begin a new frame. Before activate HS ,monitor > must be in blanking mode (front porch),before draw another line monitor > must leave blanking mode (back porch). The same for VS. There is an > active time to draw all line pixels. > > I'm correct?HS & VS are not necessarly active low, it depends of the mode. Note that all recent monitor I tried absolutly didn't care about polarity and locked what ever I used ... You have : * Front porch : Sync signal is not active, video signal is at blanking level * Sync : Sync signal is active, video signal is at blanking level * Back porch : Sync signal is not active, video signal is at blanking level * Active video : Sync signal is not active, video signal is whatever you need to display and that's for both h & v sync.> I don't understand timing. > For example if back porch takes 4us and active time takes 25 us in a > 640x480 screen > > Is the monitor expecting this timings? I mean , if I stay 8 useconds in > back porch will the monitor wait for me? , or will it begin to draw the > line after 4us? > > Is the monitor reading RGB data every (25us/640)?The monitors try to "lock" onto the input signal ... depending on the monitor a particular signal might be recognized or not ... The only way to ensure it's gonna be recognized by all monitor is to use a "standard" timing. If it's just for experimentation, just try ... it might just work ... Sylvain
Reply by ●February 19, 20062006-02-19
Another good resource is http://www.xess.com/appnotes/vga.pdf Paul Jordi wrote:> > Hi, > I'm new in fpgas.I've been researching about vga timings for a few > days, but all information I've found it's confusing. I will try to > explain what I've learn: > > HS,VS signals are active low. HS tells the monitor to begin a new line, > VS tells the monitor to begin a new frame. Before activate HS ,monitor > must be in blanking mode (front porch),before draw another line monitor > must leave blanking mode (back porch). The same for VS. There is an > active time to draw all line pixels. > > I'm correct? > I don't understand timing. > For example if back porch takes 4us and active time takes 25 us in a > 640x480 screen > > Is the monitor expecting this timings? I mean , if I stay 8 useconds in > back porch will the monitor wait for me? , or will it begin to draw the > line after 4us? > > Is the monitor reading RGB data every (25us/640)? > > I've read some timings in > http://www.epanorama.net/documents/pc/vga_timing.html > Thanks ins advance, > > Jordi
Reply by ●February 19, 20062006-02-19
On a sunny day (19 Feb 2006 06:02:13 -0800) it happened "Jordi" <a80x86@hotmail.com> wrote in <1140357733.500121.71180@g47g2000cwa.googlegroups.com>:>Hi, >I'm new in fpgas.I've been researching about vga timings for a few >days, but all information I've found it's confusing. I will try to >explain what I've learn: > >HS,VS signals are active low. HS tells the monitor to begin a new line, >VS tells the monitor to begin a new frame. Before activate HS ,monitor >must be in blanking mode (front porch),before draw another line monitor >must leave blanking mode (back porch). The same for VS. There is an >active time to draw all line pixels. > >I'm correct? >I don't understand timing. >For example if back porch takes 4us and active time takes 25 us in a >640x480 screen > >Is the monitor expecting this timings? I mean , if I stay 8 useconds in >back porch will the monitor wait for me? , or will it begin to draw the >line after 4us?The horizontal timebase in the monitor will be triggered by the neg sync edge, and that is when it starts scanning. If you make backporch (blanking) longer, you will just get a vertical black bar on the screen. Think of the 'monitor' as just 2 oscillators, one for H and one for V. These are triggered by H and V, and in fact H uses PLL and likely V too. So withing allowable syc range for a monitor you can change H and V frequency. So look at the back and front porch as just a percentage of the time a scanline takes. In fact these blanking areas are to prevent you to see non-linear effects in the scanning :-)>Is the monitor reading RGB data every (25us/640)?When the spot (still talking analog monitor) moves from left to right in that 25 uS its intensity is set by the voltage at the input. It has limited bandwidth though, and a limited number of pixels corresponding to a limited number of holes in the shadowmask, so you cannot feed it 800MHz and expect more detail ;-)
Reply by ●February 19, 20062006-02-19
On Sun, 19 Feb 2006 19:01:52 GMT, Jan Panteltje <pNaonStpealmtje@yahoo.com> wrote:>On a sunny day (19 Feb 2006 06:02:13 -0800) it happened "Jordi" ><a80x86@hotmail.com> wrote in ><1140357733.500121.71180@g47g2000cwa.googlegroups.com>: > >>Hi, >>I'm new in fpgas.I've been researching about vga timings for a few >>days, but all information I've found it's confusing. I will try to >>explain what I've learn: >> >>HS,VS signals are active low. HS tells the monitor to begin a new line, >>VS tells the monitor to begin a new frame. Before activate HS ,monitor >>must be in blanking mode (front porch),before draw another line monitor >>must leave blanking mode (back porch). The same for VS. There is an >>active time to draw all line pixels. >> >>I'm correct? >>I don't understand timing. >>For example if back porch takes 4us and active time takes 25 us in a >>640x480 screen >> >>Is the monitor expecting this timings? I mean , if I stay 8 useconds in >>back porch will the monitor wait for me? , or will it begin to draw the >>line after 4us? >The horizontal timebase in the monitor will be triggered by the neg sync edge, >and that is when it starts scanning. >If you make backporch (blanking) longer, you will just get a vertical black bar on >the screen. > >Think of the 'monitor' as just 2 oscillators, one for H and one for V. >These are triggered by H and V, and in fact H uses PLL and likely V too. >So withing allowable syc range for a monitor you can change H and V frequency. >So look at the back and front porch as just a percentage of the time a scanline takes. >In fact these blanking areas are to prevent you to see non-linear effects in the scanning :-) >>Is the monitor reading RGB data every (25us/640)? >When the spot (still talking analog monitor) moves from left to right in that 25 uS >its intensity is set by the voltage at the input. >It has limited bandwidth though, and a limited number of pixels corresponding >to a limited number of holes in the shadowmask, so you cannot feed it 800MHz and >expect more detail ;-)Something else to note - make sure that the video signal is properly blanked throughout the porch and sync periods. Failing to do this can confuse the auto-adjust process on LCD monitors.
Reply by ●February 19, 20062006-02-19
Mike Harrison wrote:> On Sun, 19 Feb 2006 19:01:52 GMT, Jan Panteltje <pNaonStpealmtje@yahoo.com> wrote: > > >>On a sunny day (19 Feb 2006 06:02:13 -0800) it happened "Jordi" >><a80x86@hotmail.com> wrote in >><1140357733.500121.71180@g47g2000cwa.googlegroups.com>: >> >> >>>Hi, >>>I'm new in fpgas.I've been researching about vga timings for a few >>>days, but all information I've found it's confusing. I will try to >>>explain what I've learn: >>> >>>HS,VS signals are active low. HS tells the monitor to begin a new line, >>>VS tells the monitor to begin a new frame. Before activate HS ,monitor >>>must be in blanking mode (front porch),before draw another line monitor >>>must leave blanking mode (back porch). The same for VS. There is an >>>active time to draw all line pixels. >>> >>>I'm correct? >>>I don't understand timing. >>>For example if back porch takes 4us and active time takes 25 us in a >>>640x480 screen >>> >>>Is the monitor expecting this timings? I mean , if I stay 8 useconds in >>>back porch will the monitor wait for me? , or will it begin to draw the >>>line after 4us? >> >>The horizontal timebase in the monitor will be triggered by the neg sync edge, >>and that is when it starts scanning. >>If you make backporch (blanking) longer, you will just get a vertical black bar on >>the screen. >> >>Think of the 'monitor' as just 2 oscillators, one for H and one for V. >>These are triggered by H and V, and in fact H uses PLL and likely V too. >>So withing allowable syc range for a monitor you can change H and V frequency. >>So look at the back and front porch as just a percentage of the time a scanline takes. >>In fact these blanking areas are to prevent you to see non-linear effects in the scanning :-) >> >>>Is the monitor reading RGB data every (25us/640)? >> >>When the spot (still talking analog monitor) moves from left to right in that 25 uS >>its intensity is set by the voltage at the input. >>It has limited bandwidth though, and a limited number of pixels corresponding >>to a limited number of holes in the shadowmask, so you cannot feed it 800MHz and >>expect more detail ;-) > > > Something else to note - make sure that the video signal is properly blanked throughout the porch > and sync periods. Failing to do this can confuse the auto-adjust process on LCD monitors.Also, make sure you use "strong" drivers for the lines that goes directly to the VGA monitor. I had a "oscillating" image on a lcd monitor because my hsync & vsync line were 12mA SLOW drivers. Using 24ma and FAST made the problem go away ... Sylvain
Reply by ●February 19, 20062006-02-19
Sylvain Munaut wrote:> Mike Harrison wrote: > > On Sun, 19 Feb 2006 19:01:52 GMT, Jan Panteltje <pNaonStpealmtje@yahoo.com> wrote: > > > > > >>On a sunny day (19 Feb 2006 06:02:13 -0800) it happened "Jordi" > >><a80x86@hotmail.com> wrote in > >><1140357733.500121.71180@g47g2000cwa.googlegroups.com>: > >> > >> > >>>Hi, > >>>I'm new in fpgas.I've been researching about vga timings for a few > >>>days, but all information I've found it's confusing. I will try to > >>>explain what I've learn: > >>> > >>>HS,VS signals are active low. HS tells the monitor to begin a new line, > >>>VS tells the monitor to begin a new frame. Before activate HS ,monitor > >>>must be in blanking mode (front porch),before draw another line monitor > >>>must leave blanking mode (back porch). The same for VS. There is an > >>>active time to draw all line pixels. > >>> > >>>I'm correct? > >>>I don't understand timing. > >>>For example if back porch takes 4us and active time takes 25 us in a > >>>640x480 screen > >>> > >>>Is the monitor expecting this timings? I mean , if I stay 8 useconds in > >>>back porch will the monitor wait for me? , or will it begin to draw the > >>>line after 4us? > >> > >>The horizontal timebase in the monitor will be triggered by the neg sync edge, > >>and that is when it starts scanning. > >>If you make backporch (blanking) longer, you will just get a vertical black bar on > >>the screen. > >> > >>Think of the 'monitor' as just 2 oscillators, one for H and one for V. > >>These are triggered by H and V, and in fact H uses PLL and likely V too. > >>So withing allowable syc range for a monitor you can change H and V frequency. > >>So look at the back and front porch as just a percentage of the time a scanline takes. > >>In fact these blanking areas are to prevent you to see non-linear effects in the scanning :-) > >> > >>>Is the monitor reading RGB data every (25us/640)? > >> > >>When the spot (still talking analog monitor) moves from left to right in that 25 uS > >>its intensity is set by the voltage at the input. > >>It has limited bandwidth though, and a limited number of pixels corresponding > >>to a limited number of holes in the shadowmask, so you cannot feed it 800MHz and > >>expect more detail ;-) > > > > > > Something else to note - make sure that the video signal is properly blanked throughout the porch > > and sync periods. Failing to do this can confuse the auto-adjust process on LCD monitors. > > Also, make sure you use "strong" drivers for the lines that goes > directly to the VGA monitor. I had a "oscillating" image on a lcd > monitor because my hsync & vsync line were 12mA SLOW drivers. Using 24ma > and FAST made the problem go away ... > > SylvainAlso good to remember than the RGB input signals are terminated with 75 ohm resistors. So if you are building a R-2R DAC for each channel, you may have to take that into account.
Reply by ●February 20, 20062006-02-20
Hi, thanks to all for the answers :) !!! (and sorry for my bad english :( ) I think I'm begining to understand how it works. If the monitor uses PLL then the HSync frecuency determines how fast the monitor moves the beam.So if I increase the HSync frecuency the active time is shorter(and the back and front porch) but I can draw more lines per second so I can have better resolutions. I don't understand how resolution control works. The monitor has a fixed number of pixels(Let's supose a 1024x768 monitor). If I ouput 640x480 images and the monitor must draw 1024 pixels per line and 768 lines, then some pixels will be repeated. Isn't it? Thanks in advance, Jordi
Reply by ●February 20, 20062006-02-20
Jordi wrote:> Hi, > thanks to all for the answers :) !!! (and sorry for my bad english :( > ) > > I think I'm begining to understand how it works. > > If the monitor uses PLL then the HSync frecuency determines how fast > the monitor moves the beam.So if I increase the HSync frecuency the > active time is shorter(and the back and front porch) but I can draw > more lines per second so I can have better resolutions. I don'tYou are partially correct. The HSync tells the monitor WHEN to go to the next line. Also the HSync frequencies are defined for each standard resolution. You must stay very close to them or else the monitor will reject your signal. The monitor will determine which resolution you are using by the frequency it "sees" on both the Vsync and Hsync inputs (also the sync pulse polarity changes too).> understand how resolution control works. The monitor has a fixed number > of pixels(Let's supose a 1024x768 monitor). If I ouput 640x480 images > and the monitor must draw 1024 pixels per line and 768 lines, then some > pixels will be repeated. Isn't it?It is better to drop down to 640x480 to draw the 640x480 images. But if necessary you can use pixel scaling to scale the 640x480 image to fit a 1024x768 screen.> Thanks in advance,> Jordi-Isaac
Reply by ●February 20, 20062006-02-20
On a sunny day (20 Feb 2006 11:55:08 -0800) it happened "Jordi" <a80x86@hotmail.com> wrote in <1140465308.468125.76070@z14g2000cwz.googlegroups.com>:>Hi, >thanks to all for the answers :) !!! (and sorry for my bad english :( >) > >I think I'm begining to understand how it works. > >If the monitor uses PLL then the HSync frecuency determines how fast >the monitor moves the beam.So if I increase the HSync frecuency the >active time is shorter(and the back and front porch) but I can draw >more lines per second so I can have better resolutions. I don't >understand how resolution control works. The monitor has a fixed number >of pixels(Let's supose a 1024x768 monitor). If I ouput 640x480 images >and the monitor must draw 1024 pixels per line and 768 lines, then some >pixels will be repeated. Isn't it?Yes in an analog monitor there will be an 'aliasing' effect. Some LCD monitors and TVs will use digital processing to recalculate the picture for the resolution these themselves have. In such a case the timing requirements for the input format may be more strict, like for example a specific TV standard. In an analog monitor it is very possible to have 'half a pixel' on (if enough bandwidth): -- -- -- -- -- -- -- -- -- shadow mask --- --- --- --- --- --- --- video signal This 'half on' gives a brightness change at that pixel location. The intensity of the ascanning electron beam is just modulated by the video. In a LCD this is not the case, but the pixel brigtness can be corrected accordingly by processing.






