What are the standard clkfreq values above 80MHz?
Kye
Posts: 2,200
I'm working on a new VGA object and I figured out pretty much that you need to have an exact frequency output to get all monitors to lock at 60Hz. That screen slowly fadding to white problem·that others have had comes actually from the fact that by trying to calculate the VGA frequency output with integer math·you do not get an exact result that is usable for the pixel clock.
So... I'm just going to use precomputed·values and then·use a different one for each clock frequency.
So far I have 80Mhz, 100Mhz, and 96Mhz as supported values. Are there any more popular clock frequencies that people use?
Honestly, I'd rather not hardcode this but... I need 64 bit math to get a proper result and I'm not really that good at breaking stuff up yet.
What I need to do is this....··((6,293,750 * 4,294,967,296) / clkfreq)
If I had 64 bit math the result would then come out to 337,893,130... The exact answer I need is 337,893,131 so I need to round up after the divide.
Thanks for your help,
Oh, and about the screen slowly fadding to white error. The reason this happens is because the pixel clock is not as high as it needs to be for the number of pixels you are pumping out to the screen. Because of this, each frame to the monitor is longer than it should be and the monitor will probably see like a 59Hz signal instad of 60Hz. This causes the monitor to basically get confused. So, you can fix the problem by either increasing the pixel clock frequency until it matches the number of pixels sent to the screen or you can reduce the number of pixels sent to the screen.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Nyamekye,
Post Edited (Kye) : 7/1/2010 6:22:16 PM GMT
So... I'm just going to use precomputed·values and then·use a different one for each clock frequency.
So far I have 80Mhz, 100Mhz, and 96Mhz as supported values. Are there any more popular clock frequencies that people use?
Honestly, I'd rather not hardcode this but... I need 64 bit math to get a proper result and I'm not really that good at breaking stuff up yet.
What I need to do is this....··((6,293,750 * 4,294,967,296) / clkfreq)
If I had 64 bit math the result would then come out to 337,893,130... The exact answer I need is 337,893,131 so I need to round up after the divide.
Thanks for your help,
Oh, and about the screen slowly fadding to white error. The reason this happens is because the pixel clock is not as high as it needs to be for the number of pixels you are pumping out to the screen. Because of this, each frame to the monitor is longer than it should be and the monitor will probably see like a 59Hz signal instad of 60Hz. This causes the monitor to basically get confused. So, you can fix the problem by either increasing the pixel clock frequency until it matches the number of pixels sent to the screen or you can reduce the number of pixels sent to the screen.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Nyamekye,
Post Edited (Kye) : 7/1/2010 6:22:16 PM GMT
Comments
I especially like 96mhz since the xtals are so much cheaper than the 6.250 xtals.
I run so many different Frequencies that drivers that are not reprogramming have not any use for me.
Regards
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Nothing is impossible, there are only different degrees of difficulty.
For every stupid question there is at least one intelligent answer.
Don't guess - ask instead.
If you don't ask you won't know.
If your gonna construct something, make it·as simple as·possible yet as versatile as posible.
Sapieha
That's a 6.553600 MHz XTAL which I have a few of. The fastest I have pushed the TriBladeProp so far.
For BST users use #defines to set the frequency at build time and issue a warning if none is defined. Put the formula clearly in the code.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
For me, the past is not over yet.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Nyamekye,
If so, the numerator is evenly divisible by 100,000.
But that would be too easy ....
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Propeller Pages: Propeller JVM
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Nyamekye,
http://obex.parallax.com/objects/415/
·
People can use any frequency they like I guess as long as they realize what they're doing, but frequencies with big round numbers are commonly available. How much do those other frequencies cost for production? Is there really a great return in using them (other than that's what happened to be laying on the hobby workbench)?
Cheers,
--Steve
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Propeller Pages: Propeller JVM
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Nyamekye,
pinGroup is a variable I'm resusing and frequencyState is the output.
Rather nasty however. I would have liked a one line solution.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Nyamekye,
I did some work on calculations for my latest 1pin TV driver which uses the compiler to do the hard work in calculations which saves space in the actual code. It no doubt has the same inaccuracies due to rounding as you have found, but it may be worth a look for you. I was not originally aware I could create these calculations using the compiler.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:
· Home of the MultiBladeProps: TriBlade,·RamBlade,·SixBlade, website
· Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
· Prop Tools under Development or Completed (Index)
· Emulators: CPUs Z80 etc; Micros Altair etc;· Terminals·VT100 etc; (Index) ZiCog (Z80) , MoCog (6809)·
· Prop OS: SphinxOS·, PropDos , PropCmd··· Search the Propeller forums·(uses advanced Google search)
My cruising website is: ·www.bluemagic.biz·· MultiBlade Props: www.cluso.bluemagic.biz
f = x * a/b where x here is 232.
a=NCO frequency desired = 6_293_750 in your original example
b=cpu CLKFREQ = 80_000_000 for example, but this is a variable too.
returns f = 337_893_130 in your example with a=6_293_750 and b=80_000_000. That f is what goes into the frqa register for the NCO. The multiplication by 232 happens automatically in the algorithm.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:
· Home of the MultiBladeProps: TriBlade,·RamBlade,·SixBlade, website
· Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
· Prop Tools under Development or Completed (Index)
· Emulators: CPUs Z80 etc; Micros Altair etc;· Terminals·VT100 etc; (Index) ZiCog (Z80) , MoCog (6809)·
· Prop OS: SphinxOS·, PropDos , PropCmd··· Search the Propeller forums·(uses advanced Google search)
My cruising website is: ·www.bluemagic.biz·· MultiBlade Props: www.cluso.bluemagic.biz
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Nyamekye,
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Nyamekye,
It took me a few minutes to understand what was going on here. I learned not to long ago in my AEES course how binary math is done, and how it is accomplished within hardware.. the repeat loop to multiply is beautiful, because binary multiply can be·done as a series of additions. Its funny the more things i learn in colledge, the more i see implimented in the code i read.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Quicker answers in the #propeller chat channel on freenode.net. Don't know squat about IRC? Download Pigin! So easy a caveman could do it...
http://folding.stanford.edu/ - Donating some CPU/GPU downtime just might lead to a cure for cancer! My team stats.
Post Edited (RinksCustoms) : 7/7/2010 10:11:32 PM GMT
I'm dubious of your "25x8" claim. You might be getting programs to run at that setting, but your clock speed won't be 200MHz. The reason is that the PLL's free-running frequency tops out before 256MHz (at 16x), which means 128MHz at 8x. Basically, the PLL can't lock onto your crystal, since its frequency is way too high, and is free-running instead. According to the specs, the crystal frequency should be between 4MHz and 8MHz, although reliable operation can be had at 10MHz.
-Phil
-Phil
-Phil
Jonathan
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
lonesock
Piranha are people too.
(geek humor escalation => "There are 100 types of people: those who understand binary, and those who understand bit masks")
-Phil
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Nyamekye,
From my tests I believe the DIP is more tolerant - don't ask me why as I haven't a clue.
As for cooling, theoretically it should go faster, but the chip is not getting hot.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:
· Home of the MultiBladeProps: TriBlade,·RamBlade,·SixBlade, website
· Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
· Prop Tools under Development or Completed (Index)
· Emulators: CPUs Z80 etc; Micros Altair etc;· Terminals·VT100 etc; (Index) ZiCog (Z80) , MoCog (6809)·
· Prop OS: SphinxOS·, PropDos , PropCmd··· Search the Propeller forums·(uses advanced Google search)
My cruising website is: ·www.bluemagic.biz·· MultiBlade Props: www.cluso.bluemagic.biz