Shop OBEX P1 Docs P2 Docs Learn Events
setting clock frequency — Parallax Forums

setting clock frequency

jered11jered11 Posts: 7
edited 2013-12-01 08:05 in Propeller 1
I am wondering about setting the clock frequency under the con block in a parent object. My question is can this be used with the P8X32A-D40???
I have used this set up with the quick start and it works fine but it doesn't work just using the chip.



CON
_xinfreq = 16_000_000
_clkmode = xtal2 + pll2x

Comments

  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2013-11-30 03:36
    Are you expecting to just run the Propeller at 16Mhz, or are you attempting to run it at a higher multiple via the pll?

    In general, if you want 80Mhz, the 5Mhz Xtal is the limit that the ppl with accept, maybe you can go to 6 or 6.25Mhz for overclocking with risk of damage. But I believe 16Mhz would be way too high for pll use.

    The chip has real physical limits as the faster you clock, the more heat it generates and it is usually heat that does serious damage to silicon.

    There really isn't any good reason to bother with a 16Mhz crystal.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2013-11-30 04:06
    To use the PLL, _xinfreq must be between 4 MHz and 8 MHz (re: datasheet), although 10 MHz works just fine. 16 MHz is much too high, though.

    -Phil
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2013-11-30 07:55
    So, rereading your question.. it seems you want a target of 32Mhz.
    It can be done with several different xtals: a 2Mhz, 4Mhz, or 8Mhz would work nicely with pll multipliers.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2013-11-30 08:43
    So, rereading your question.. it seems you want a target of 32Mhz.
    It can be done with several different xtals: a 2Mhz, 4Mhz, or 8Mhz would work nicely with pll multipliers.
    The PLL will not work with a 2 MHz crystal. See my post above.

    -Phil
  • jered11jered11 Posts: 7
    edited 2013-11-30 09:08
    awesome, thanks for the help. the 16mhz is all i have but will be getting a 5mhz now. I some how must have over looked this info in the datasheet..
  • PublisonPublison Posts: 12,366
    edited 2013-11-30 09:17
    jered11 wrote: »
    awesome, thanks for the help. the 16mhz is all i have but will be getting a 5mhz now. I some how must have over looked this info in the datasheet..

    From post #1 you are saying this worked on a Quickstart Board?
    [COLOR=#333333]CON[/COLOR]
    [COLOR=#333333]_xinfreq = 16_000_000[/COLOR]
    [COLOR=#333333]_clkmode = xtal2 + pll2x[/COLOR]
    

    The QuickStart comes with a SMD 5 Mhz Xtal and that CON should not have worked on the stock board. Did you modify the board?

    BTW welcome to the forum!

    Jim
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2013-12-01 02:38
    The PLL will not work with a 2 MHz crystal. See my post above.

    -Phil

    Thanks Phil, over all the years I have just stayed with the 5Mhz xtal. I was aware there were limits, but I have always though it was just an upper limit. I even have a 32Khz clock crystal that I have been saving for a radically slow Propeller. I guess that is useless.

    Once a user starts playing with other crystals, large amounts of the OBEX files require careful revision. It may be interesting to tinker with other speeds. But until one has a specific need to do so, it can just add another burdern to programs working well.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2013-12-01 08:05
    I even have a 32Khz clock crystal that I have been saving for a radically slow Propeller. I guess that is useless.
    No, not useless. You should still be able to use it without the PLL for a 32 kHz system clock.

    -Phil
Sign In or Register to comment.