Pages: [1]   Go Down
Author Topic: Is a crystal that resonates at 25.17446 (instead of 25.175) close enough for VGA  (Read 390 times)
0 Members and 1 Guest are viewing this topic.
More Cowbell
Offline Offline
Edison Member
*
Karma: 11
Posts: 1025
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

How accurate does a crystal have to be to generate a correct signal for VGA?  I have done this project:

http://www.pyroelectro.com/tutorials/fpga_vga_resistor_dac/

And it works just fine but some of the color banding is a little off and I was wondering if it could be timing.  My crystal oscillator is counting at 25.17447Mhz which is pretty darn close to 25.175 but as the crystal says 25.1750 on it I am thinking doesn't that extra zero imply a significant digit there, i.e. that it should register between 25.17495 and 25.17505Mhz?  Using that high standard, 25.17447Mhz is out of spec.  But it still feels as if it's close enough that it shouldn't matter.  What do you think?

Oh, and this counter is cheap but it seems to be accurate.  I have two of the used 10Mhz rubidium standards off of eBay and when I count those, they count close but not right at 10.00000Mhz prior to lock but once they lock the counter shows them exactly at 10.00000Mhz which implies to me that this counter is actually very accurate (though cheap and it doesn't actually have an input to use those standards as a timebase which sucks).

The standards:

http://www.ebay.com/itm/FE-5680A-Rubidium-Atomic-Frequency-Standard-10MHz-out-/280655233263

The cheap counter:

http://www.ebay.com/itm/VC3165-Radio-Frequency-Counter-RF-Meter-0-01Hz-2-4GHz-Professional-Tester-/151021654592
Logged

Vexatious Sampler

SE USA
Offline Offline
Faraday Member
**
Karma: 40
Posts: 3783
@ssh0le
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

if your timing was off a significant amount your monitor would not sync, or at least you would get wiggly text / pixels

the 25.175 is used as the dot clock and is divided by numbers for the sync, color is just an analog function that happens during the active video line and is not effected by timing
Logged


More Cowbell
Offline Offline
Edison Member
*
Karma: 11
Posts: 1025
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

if your timing was off a significant amount your monitor would not sync, or at least you would get wiggly text / pixels

the 25.175 is used as the dot clock and is divided by numbers for the sync, color is just an analog function that happens during the active video line and is not effected by timing

Yeah, that is sort of what I was thinking.  The pattern is rock solid, it's just not exactly how I thought it would be.  I will spend some time rechecking everything.  But it does work solidly so far.
Logged

Vexatious Sampler

Worst state in America
Offline Offline
God Member
*****
Karma: 23
Posts: 665
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

How accurate does a crystal have to be to generate a correct signal for VGA?  I have done this project:

http://www.pyroelectro.com/tutorials/fpga_vga_resistor_dac/

And it works just fine but some of the color banding is a little off and I was wondering if it could be timing.  My crystal oscillator is counting at 25.17447Mhz which is pretty darn close to 25.175 but as the crystal says 25.1750 on it I am thinking doesn't that extra zero imply a significant digit there, i.e. that it should register between 25.17495 and 25.17505Mhz?  Using that high standard, 25.17447Mhz is out of spec.  But it still feels as if it's close enough that it shouldn't matter.  What do you think?

Oh, and this counter is cheap but it seems to be accurate.  I have two of the used 10Mhz rubidium standards off of eBay and when I count those, they count close but not right at 10.00000Mhz prior to lock but once they lock the counter shows them exactly at 10.00000Mhz which implies to me that this counter is actually very accurate (though cheap and it doesn't actually have an input to use those standards as a timebase which sucks).

The standards:

http://www.ebay.com/itm/FE-5680A-Rubidium-Atomic-Frequency-Standard-10MHz-out-/280655233263

The cheap counter:

http://www.ebay.com/itm/VC3165-Radio-Frequency-Counter-RF-Meter-0-01Hz-2-4GHz-Professional-Tester-/151021654592

25.17495 / 25.17505 = 0.999996

I would call that "close enough".  It's only 100 HERTZ off!

Most crystals are not even manufactured that close.
Logged

More Cowbell
Offline Offline
Edison Member
*
Karma: 11
Posts: 1025
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

How accurate does a crystal have to be to generate a correct signal for VGA?  I have done this project:

http://www.pyroelectro.com/tutorials/fpga_vga_resistor_dac/

And it works just fine but some of the color banding is a little off and I was wondering if it could be timing.  My crystal oscillator is counting at 25.17447Mhz which is pretty darn close to 25.175 but as the crystal says 25.1750 on it I am thinking doesn't that extra zero imply a significant digit there, i.e. that it should register between 25.17495 and 25.17505Mhz?  Using that high standard, 25.17447Mhz is out of spec.  But it still feels as if it's close enough that it shouldn't matter.  What do you think?

Oh, and this counter is cheap but it seems to be accurate.  I have two of the used 10Mhz rubidium standards off of eBay and when I count those, they count close but not right at 10.00000Mhz prior to lock but once they lock the counter shows them exactly at 10.00000Mhz which implies to me that this counter is actually very accurate (though cheap and it doesn't actually have an input to use those standards as a timebase which sucks).

The standards:

http://www.ebay.com/itm/FE-5680A-Rubidium-Atomic-Frequency-Standard-10MHz-out-/280655233263

The cheap counter:

http://www.ebay.com/itm/VC3165-Radio-Frequency-Counter-RF-Meter-0-01Hz-2-4GHz-Professional-Tester-/151021654592

25.17495 / 25.17505 = 0.999996

I would call that "close enough".  It's only 100 HERTZ off!

Most crystals are not even manufactured that close.

You are quoting my theoretical numbers that I say are implied by the crystal marking.  And those theoretical numbers are even better than that, they can be at most 50 hertz off of the true mark, either side.  But, the actual measurement is 25.17446Mhz which is 540 hertz off or ~21 ppm.  Like I said, it sounds good to me too, it's just that the way I read the crystal marking it implies the accuracy should be even better.

Edit:

Now I finally look up what is considered a good crystal oscillator in terms of ppm and actually 20 ppm is considered quite good for a non-compensated crystal oscillator so this oscillator must be good and either that extra zero is puffery or I am reading it wrong.  But the crystal is acceptable.
« Last Edit: April 06, 2013, 10:34:26 pm by JoeN » Logged

Vexatious Sampler

More Cowbell
Offline Offline
Edison Member
*
Karma: 11
Posts: 1025
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Now that I eliminated that I figured it out.  I had the pin assignments for the RGB pins backwards so the weightings were screwed up.  That fixed it completely.  Now I have this project recreated, though with a slightly more modern 3.3V CPLD (Altera EPM1270).  So I will note this as a success and move on and see what I can do with the remaining 85% of this CPLD.
Logged

Vexatious Sampler

Pages: [1]   Go Up
Jump to: