Shop OBEX P1 Docs P2 Docs Learn Events
Crystal 8.00MHz istead of Crystal 5.00MHz — Parallax Forums

Crystal 8.00MHz istead of Crystal 5.00MHz

Luis_PLuis_P Posts: 246
edited 2011-06-03 14:18 in Propeller 1
I see in the Propeller Education Kit Lab they used Crystal 5.00MHz between pin 31 and 30. Can I use 8.00MHz? instead? I also have 4.00MHz. Something on the code needs to be change? I think is for clock purposes but I'm not sure.

Gracias!

Comments

  • MicrocontrolledMicrocontrolled Posts: 2,461
    edited 2011-06-02 13:13
    You would have to change the _clkfreq variable at the top to match the new frequency and the _clkmode to something like pllx8 rather than pllx16. You can't up the speed by that much more, as the current propeller only supports overclocking of 120Mhz.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2011-06-02 13:25
    I agree with Microcontrolled. The 8MHz crystal should be fine. The Hydra uses a 10MHz crystal.

    As Microcontrolled said, you'll want to use a different PLL multiplier. An 8 PLL times your 8MHz crystal will give you a clock speed of 64MHz. That's plenty fast enough for lots of stuff.

    Good luck on your Propeller education. I think (and many, if not most, on the forum will agree) the Propeller is a lot of fun.

    Duane
  • Mark_TMark_T Posts: 1,981
    edited 2011-06-02 16:59
    The crystal should be between 4MHz and 8MHz IIRC, with the PLL set appropriately to give suitably fast internal clock for your application - you don't have to run at 80MHz internal if you don't want to - lower clock means lower current consumption...

    The PLL only multiplies the crystal freq by powers of 2, so with a 8MHz crystal you can run internal clock at 8, 16, 32, 64 or 128MHz (The latter might not be reliable).
  • ManAtWorkManAtWork Posts: 2,178
    edited 2011-06-03 06:21
    If I remeber correctly the PLL of the propeller ALWAYS multiplies with x16 and then divides by 1, 2, 4, or 8 according to the clock register contents. So using a crystal >5Mhz is dangerous and officially not supported.
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2011-06-03 08:59
    "So using a crystal >5Mhz is dangerous and officially not supported."
    Not so.

    The SpinStamp, an official Parallax product, uses a 10MHz timebase.
    The max PLL for it is 8.

    You want your timebase * PLL to not exceed 80 (80 MHz).
  • SapiehaSapieha Posts: 2,964
    edited 2011-06-03 09:05
    Hi Luis.

    Use what You have -- But as others said - You maybe need use different divider.

    BUT Propeller are constructed so GOOD -- That it is happy with most of Crystals up to 14.3 MHz --- Some IC's up to 15 MHz with PLL8

    Luis_P wrote: »
    I see in the Propeller Education Kit Lab they used Crystal 5.00MHz between pin 31 and 30. Can I use 8.00MHz? instead? I also have 4.00MHz. Something on the code needs to be change? I think is for clock purposes but I'm not sure.

    Gracias!


    Ps. But don't forget good decoupling (capacitors)
  • Duane DegnDuane Degn Posts: 10,588
    edited 2011-06-03 12:49
    Mark_T wrote: »
    The crystal should be between 4MHz and 8MHz IIRC

    You are not remembering correctly.
    ManAtWork wrote: »
    If I remeber correctly <snip> So using a crystal >5Mhz is dangerous and officially not supported.

    You're not remembering everything correctly either. Several official Parallax products use 10MHz crystals with the Propeller.


    PJ Allen wrote: »
    "So using a crystal >5Mhz is dangerous and officially not supported."
    Not so.

    The SpinStamp, an official Parallax product, uses a 10MHz timebase.
    The max PLL for it is 8.

    You want your timebase * PLL to not exceed 80 (80 MHz).

    Yes, I haven't used a SpinStamp myself. The Hydra also uses a 10MHz crystal.
    Sapieha wrote: »
    Ps. But don't forget good decoupling (capacitors)

    Sapieha, You might as well make that part of you signature. It's nice you keep trying to help us thick skulled hobbiests.

    Duane
  • SapiehaSapieha Posts: 2,964
    edited 2011-06-03 14:04
    Hi Duane.
    Sapieha, You might as well make that part of you signature. It's nice you keep trying to help us thick skulled hobbiests.

    Duane


    I don't pretend to any Rewards For that advice -- To place it in signature.
  • WhitWhit Posts: 4,191
    edited 2011-06-03 14:16
    Parallax also sells a 6.25 MHz Crystal - see - http://www.parallax.com/Store/Components/ResonatorsCrystals/tabid/153/CategoryID/53/List/0/SortField/0/Level/a/ProductID/570/Default.aspx

    and as the link says, "This crystal has proven to be a reliable way to increase the speed of the Propeller; if properly used, the crystal can boost the speed of the Propeller microcontroller up to 100 MHz from the original 80 MHz. This will allow for even more processing power capabilities."

    So, the Prop has the ability to be overclocked reliably - at least by 20 MHz.
  • Beau SchwabeBeau Schwabe Posts: 6,568
    edited 2011-06-03 14:18
    The internal PLL that connects to the external crystal can run upwards of about 170MHz ... The remainder of the chip cannot it's maximum speed is closer to 100MHz, therefore you need to specify a divider tap of PLL8 rather than PLL16.

    So what is this saying? ... A 10MHz external crystal will internally wind up the PLL to 160MHz, but because the remainder of the chip can only operate at 100MHz you take the PLL8 tap which in turn supplies 80MHz to the remainder of the Chip.

    Same with an 8MHz crystal ... internally, the PLL gets wound up to 128MHz which may be border line for some Propellers to operate at PLL16... however at PLL8 the remainder of the chip sees 64MHz so at that setting it works out fine.
Sign In or Register to comment.