Shop OBEX P1 Docs P2 Docs Learn Events
10mhz crystal * PLL 8x == 80MHz ? — Parallax Forums

10mhz crystal * PLL 8x == 80MHz ?

acantostegaacantostega Posts: 105
edited 2006-07-14 15:03 in Propeller 1
Hi, I am building a board for my second Propeller and I just realized I don't have 5 MHz crystals. I do have a ton of 4, 10, and 20 MHz crystals, though. So I thought maybe I could use a 10Mhz crystal with 8x pll or even a 20Mhz crystal with 4x pll -- but then, I see in the manual that with PLL, only 3 to 8 MHz crystals can be used. Is this right? Would it be dangerous to experiment with this?
Thanks,
Daniel

Comments

  • Beau SchwabeBeau Schwabe Posts: 6,568
    edited 2006-07-09 07:40
    acantostega,

    This is true if you are planning on using the PLL to wind up the frequency. The reason is that internally the PLL will always generate X16.
    When you specify x4, x8, etc. you are just selecting an internal tap from the PLL. Running the oscillator at 8MHz pushes the PLL towards
    the upper frequency limit of 128MHz in this version of silicon. If you try to go higher than that, the PLL could show unpredictable behavior.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.
  • cgraceycgracey Posts: 14,206
    edited 2006-07-09 08:05
    The PLL was designed to conservatively operate·up to·160MHz with worst process, lowest voltage, and highest temperature. We say 64-128MHz, just because·they're nice numbers that relate to common 4 and 8MHz crystals. Go ahead and use your 10MHz with 8x PLL. BTW, you cannot hurt the Propeller by trying to make it go faster. It just may not work, that's all. Just reset and try again. The PLL tops out at around 230MHz at room temperature during experimentation.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔


    Chip Gracey
    Parallax, Inc.
  • CJCJ Posts: 470
    edited 2006-07-09 12:23
    I suspect a lot of props will be trying on some new running shoes this next week

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Who says you have to have knowledge to use it?

    I've killed a fly with my bare mind.
  • acantostegaacantostega Posts: 105
    edited 2006-07-09 19:51
    Ok, I see. Thanks for the answers!
  • william chanwilliam chan Posts: 1,326
    edited 2006-07-10 05:41
    What about resonators?

    Can we use resonators instead of crystals?

    Will it be less accurate?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.fd.com.my
    www.mercedes.com.my
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2006-07-10 11:37
    This has been REVISED.

    The accuracy of crystals and resonators is related to several physical realities.· One is aging of the actual device can cause a drift; another is a constant temperature provided for the device is needed to get high accuracy.

    The beauty of the resonator [noparse][[/noparse]3-pin] variety is its smallness and completeness; and I suspect it is the 'state-of-the-art' prefered solution.·

    It will provide accuracy to 0.5% or 1/200ths. These are now in surface mount.· Apparently the Propeller will work with the older 2-pin resonators. Having a X16 PLL is fortunate because a lot of these slower resonators and crystals are still easily available; the higher frequencies [noparse][[/noparse]over about 25mHz] appear to require custom production or limited selection. In all cases, the accuracy is about the same regardless of the frequency.

    Crystals will do the·much better·accuracy [noparse][[/noparse]10x6] 1/1000000th, but not all are cut in the same fashion and some cuts may take up a harmonic frequency if not driven correctly. Seems to me that you may not know you have a difficult cut until you try it. I certainly don't see people advertising this weakness, but it is mentioned the The Art of Electronics.

    If you want better, you have to go to a TXO [noparse][[/noparse]a crystal in an oven] which will go to 10X7 accuracy- in the $100usd range for single specified quantities. Beyond that is possible, but I strongly suspect cost is huge and in some cases it is considered 'military hardware' and controlled by governments. After all, the better the oscillator, the narrower the band and the harder to find you as a target. Some of these are research calibration tools, a bit bulky and inside a fairly large enclosure.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "If you want more fiber, eat the package.· Not enough?· Eat the manual."········
    ···················· Tropical regards,····· G. Herzog [noparse][[/noparse]·黃鶴 ]·in Taiwan

    Post Edited (Kramer) : 7/12/2006 11:40:37 AM GMT
  • acantostegaacantostega Posts: 105
    edited 2006-07-10 21:39
    Hm, I'm no expert on this, but I had the impression that in general ceramic resonators are less accurate than crystals, at least by one order of magnitude (although still enough for vast majority of purposes). I suspect crazy stuff like the 460k baud the Propeller can do needs all the accuracy it can get.
    Anyway, I haven't got around to trying the 10Mhz * 8xPLL stuff out, since the propeller hasn't arrived yet. I'll post the results when it does.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2006-07-11 13:05
    I checked the Murata web site and Acantostega is correct -- I am wrong.

    Resonators are usually 0.5% tolerance, but can go down to 0.25% tolerance in specified devices. That is 1/400th. The crystal is 1/1000000th.

    I am revising my above post.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "If you want more fiber, eat the package.· Not enough?· Eat the manual."········
    ···················· Tropical regards,····· G. Herzog [noparse][[/noparse]·黃鶴 ]·in Taiwan
  • RinksCustomsRinksCustoms Posts: 531
    edited 2006-07-12 20:26
    still though, a PROpeller stable at nearly a third of a GHz! and a language 100 times easier than any C ver. I can only forsee the prop paralleling current Intel P4's and AMD 32bit'ers proccesing power in about 8 years time.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Definetly a E3 (Electronics Engineer Extrodinare!)
    "I laugh in the face of imposible,... not because i know it all, ... but because I don't know well enough!"
  • Shawn ReedShawn Reed Posts: 6
    edited 2006-07-12 20:33
    Don't forget that by "spinning up" that crystal you will magnify the crystal error by that same multiplier. Just something to keep in mind. Unless of course I'm wrong. :S

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    -Shawn
  • David BDavid B Posts: 592
    edited 2006-07-12 22:50
    One of my first propeller projects was to input the 1 pulse-per-second signal from a GPS sensor and write a program that captured clock counts between GPS pulses, which gave the multiplied crystal frequency, in Hz. So the answer to these accuracy questions is pretty easily obtainable right out of the propeller itself.

    I found I could slow the rate down quite linearly by touching an ice cube to the metal crystal case.
  • TigerTiger Posts: 105
    edited 2006-07-12 22:54
    Couple of comments on two posts I just read. First, the percentage of error of a crystal or resonator is the same whether you "spin it up" or not. The percentage is not multiplied up with the PLL multiplication just as it is not changed in any way by the specified frequency of the part.

    Referring to another post, a "resonator" is not a dumbed down "crystal". It's a completely different technology. Resonators are "ceramic" and Crystals are "quartz" Not only is the initial frequency accuracy of the resonator far less, but it is also much less stable over temperature and time. The difference in price is because making a crystal requires cutting, grinding, polishing, plating, mounting and other expensive processes. Making a resonator is more like laying an egg. tongue.gif The good news is that many (actually most) applications really don't require crystal accuracy and the resonators are really cheap.

    My two bits... Tiger
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2006-07-13 13:42
    Regarding 'amplifying error'.
    Actually you just keep the same margin of error that you had to begin with.

    In bit banging serial, this is solved by oversampling [noparse][[/noparse]each bit is read 4 or more times to verify data regardless of clocking being not exactly the same from one computer to another. In that situation, 3% error is considered about the limit. So people use the Resonators at 0.5% error and another 0.3% thermal shift.

    I suspect with a good, verified crystal [noparse][[/noparse]0.000001% error]; the drift or error only comes into play if you are timekeeping or do not calibrate your crystal. And timekeeping is really better done by an outboard chip with a BU battery. It eventually inteferes with trying to handle other tasks [noparse][[/noparse]at least it did before parallel processors] and wastes power.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "If you want more fiber, eat the package.· Not enough?· Eat the manual."········
    ···················· Tropical regards,····· G. Herzog [noparse][[/noparse]·黃鶴 ]·in Taiwan
  • Kaos KiddKaos Kidd Posts: 614
    edited 2006-07-13 14:26
    If you multply the freq, the error goes up in EQUAL amounts, does it not? This is because the error is part of the base frequency.
    If you have 1 million pulses in 1 second, with a 100000th error, that means two pulses will be malformed (IE the error as detected).
    If you multply the pulses to 5 million pulses in 1 second (ie X5), you will still get 10 pulses that would be malformed.
    Just as Kramer stated.
    I sampled Maxum's Higly accurate I2C RTC, and it's error % is very small.
    At some point I was going to see if I could use the output of that very accurate clock, use a PLL to X it up, and use that as the feed into the
    xtal inputs on the propeller. Somewhat byond my abilityies, but it's on my 'todo' list...
    Didn't someone post someplace here that it's the error from the xtals that drives some of the other freq generation issues?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Just tossing my two bits worth into the bit bucket


    KK
    ·
  • TigerTiger Posts: 105
    edited 2006-07-14 10:49
    Kramer - You are correct that error (%) remains the same when multiplying the frequency. Also, I've found that "oversampling" is rarely done when guys "bit bang" serial. It is however always done in a real UART. This is however done for noise immunity and not to compensate for any frequency error. The fact is that taking multiple samples is more likely to get you "into" trouble than "out of" trouble if you have frequency error. This is because you are more apt to take samples outside of the actual bit frame if you take more than what you believe is one center sample. I don't find "oversampling" of any real benefit for signals flowing in a small system. Where it can be a benefit is when you transmit over very long lines subject to noise or over some kind of modem modem (wire or especially radio).

    Kaos - I'm not sure exactly what you mean by "pulses will be malformed". I think maybe you are thinking about this in absolute frequency error (in Hz), which is not the way to think about it. How about this... You have a 1MHz oscillator with an error of 100 Hz. That's an error of 100/1000000 or .01%. Then you multiply it up 10X with the PLL in the Propeller. Now you have a 10MHz signal with an error of 1000 Hz which is still .01%. Thinking of the error in terms of actual frequency tends to take you down the wrong road. Error is always specified as a % for that reason.

    ...Tiger
  • Kaos KiddKaos Kidd Posts: 614
    edited 2006-07-14 14:41
    Tiger...
    Your right about how I was looking at it, ie absolute frequency as a number. YOur explnation is easier to follow.
    Thanks

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Just tossing my two bits worth into the bit bucket


    KK
    ·
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2006-07-14 15:03
    'when bit banging........' I may be fuzzy on the concept. I live in Taiwan and I have been isolated from much of the tech revolution for the past 15 years. I constantly find myself caught in wrong assumptions [noparse][[/noparse]no one to talk to locally].

    The SXes do oversampling in their VPs [noparse][[/noparse]virtual peripheral] and I presume that the Propeller would do the same.
    Is that a 'real UART' or 'bit-banging' or something else? I guess I presumed a 'real UART' was hardware; not software, not firmware.

    I understand what you are saying about long lines and noise as all this is discussed in CANbus documentation. CANbus has a very sophisticated way of assuring it samples the data in an approximate 'center'. It gets rid of the noise via CRC, discarding bad data, and requesting a retransmission. I suppose that is the only way to go for 'small packets'.

    As I understand it, 'malformed pulses' are a transmission problem due to phase shifting over distances and electronic interfaces causing overshoot/undershoot and delays.

    The oscillator and its few related components are the 'heartbeat' of timing and the input is preferred to be a SINE wave generated by the crystal/resonator because it ideally has NO harmonic overtones. A SQUARE wave has harmonic overtones that actually contribute to making it square. While it can be used as an input to OSC pins, it is generally not preferred. There are lots of ways to generate an oscillation and lots of wave shapes, but each has its own purposes and place in electronic history.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "If you want more fiber, eat the package.· Not enough?· Eat the manual."········
    ···················· Tropical regards,····· G. Herzog [noparse][[/noparse]·黃鶴 ]·in Taiwan
Sign In or Register to comment.