Shop OBEX P1 Docs P2 Docs Learn Events
question about VGA timing — Parallax Forums

question about VGA timing

dr hydradr hydra Posts: 212
edited 2011-01-28 13:38 in Propeller 1
I am working on a driver for a VGA display using the propeller. How come VGA (640 x 480 60hz) timing is listed with a dot clock of 25.175 mhz or 39.72194 ns. Using the active horizontal video timing of 25.17us, I get only 633 or 634 pixels. Not 640. To get 640 pixels the dot clock would need to be 25.427 mhz or 39.328 ns....right?

Comments

  • AndreLAndreL Posts: 1,004
    edited 2011-01-27 14:23
    There are 800 dots in a 640 display, the best way to think of this stuff is that 640 are active, the rest is sync, etc. then things will work out better and make more sense. You have your horizontal timing wrong, its (25.175MHZ ^ -1 * 800)^-1 = 31.46875Khz.

    NTSC is the same, think in terms of the entire line being "pixels" then some is active, some is sync. In fact, this is how we write all the video drivers for VGA and NTSC.

    Andre'
  • dr hydradr hydra Posts: 212
    edited 2011-01-28 08:48
    Andre

    Great, thank you. 800 clocks will work (horizontal). For the vertical, do you use 525 lines (480 active the other 45 Vsync/front porch etc.)
  • potatoheadpotatohead Posts: 10,261
    edited 2011-01-28 10:18
    I like to start with something like this:

    http://www.epanorama.net/faq/vga2rgb/calc.html

    Then figure out the syncs and porches, which leaves active pixels.

    From there, you can make choices about your actual pixel clock during the active time, and or adjusting the porches to round things to convenient multiples of PLLA. You can also then figure out how the syncs will be generated.
  • AndreLAndreL Posts: 1,004
    edited 2011-01-28 13:38
    Also, my HYDRA book covers this in detail, if you have it, just open it up and read the chapter on VGA and NTSC. But, yes, there are 525 lines and 480 are active, the others are sync, blanking.

    Andre'
Sign In or Register to comment.