1
\$\begingroup\$

I'm trying to determine what is the correct timing for 640x480 VGA. Using Tinyvga.com for 640x480@60Hz I get a pixel frequency of 25.2 Mhz and not 25.175 Mhz.

800*525*60 = 25200000

I have wrote assembly for a AVR outputing Hsync and Vsync and my logic analyzer shows the freq per frame is 60.06hz which is correct for a oscillator of 25.175Mhz.

If I use a 25.2Mhz oscillator the freq per frame is 59.94hz.

Which is right?

\$\endgroup\$
2
  • \$\begingroup\$ that sounds a lot like the 24fps vs 25fps mismatch? Or a 50 Hz vs 60 Hz mismatch? \$\endgroup\$ Mar 1, 2019 at 19:07
  • \$\begingroup\$ Both. Neither and that is fine. Monitors are tolerant of at least that wide a range. Digital ones have a way to train the sampler. And a free running oscillator won't be in synch with the mains anyway. \$\endgroup\$ Mar 1, 2019 at 19:12

1 Answer 1

2
\$\begingroup\$

25.175 MHz is the official frequency, used back in the day in original VGA card and today in digital video interfaces. The horizontal and vertical timings are designed to be very close to NTSC frequencies, so the vertical refresh rate is not 60 Hz but approximately 59.94 Hz

\$\endgroup\$
3
  • \$\begingroup\$ 25.2 MHz / 1.001 = 25.175 MHz. The factor of 1.001 is an artifact of how NTSC is done. \$\endgroup\$
    – Dave Tweed
    Mar 1, 2019 at 19:16
  • \$\begingroup\$ For the asker building something that does crude video by software timing with MCU instructions, the difference would be more a tangential curiosity than something that practically matters. \$\endgroup\$ Mar 1, 2019 at 20:31
  • \$\begingroup\$ those little microcontrollers run ar predictable speeds unlike desktop cpus. \$\endgroup\$ Mar 1, 2019 at 20:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.