Shop OBEX P1 Docs P2 Docs Learn Events
What Is The Maximum Allowable Trace Length From The Crystal To The Propeller Chip? — Parallax Forums

What Is The Maximum Allowable Trace Length From The Crystal To The Propeller Chip?

idbruceidbruce Posts: 6,197
edited 2012-11-15 23:18 in Propeller 1
Hello Everyone

I remember reading it someplace that the crystal should be as close to the XI and XO pins of the Propeller chip as possible. In a worst case scenario, what would be the maximum trace length of these connections and still expect it all to function properly?

Bruce

Comments

  • LeonLeon Posts: 7,620
    edited 2012-11-15 07:12
    It's more a problem of meeting FCC and CE requirements for RF emissions.
  • idbruceidbruce Posts: 6,197
    edited 2012-11-15 07:23
    Really? I would have never thought that.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2012-11-15 07:39
    If you think about it, the crystal is the work horse of the whole microcontroller. It drives all the internal flip-flops and is a significant power consumer as it is always working to get everything else marching in step.

    Since it creates square waves, the nasty harmonics are radiated from it. The faster you go, the more power you need to use to drive it and the bigger the problem. Generally, under 20Mhz or so, it is not an issue. And driving at 3.3v is less of an issue than at 5.0v.

    If you look at the old SX chip Proto Boards, the Xtal configuration was quite far away (inches maybe) and they clocked up to 80Mhz without functional problems. But on a bad day, the FCC might come knocking on your door to ask what exactly you are doing. First time offenders are politely asked to just stop and do no more.
  • ctwardellctwardell Posts: 1,716
    edited 2012-11-15 07:39
    Bruce,

    Some good info here, with a few references as well.

    http://www.avrfreaks.net/index.php?name=PNphpBB2&file=printview&t=81294&start=0

    And *look* it even includes our beloved Leon. :)

    C.W.
  • Tracy AllenTracy Allen Posts: 6,664
    edited 2012-11-15 08:07
    The crystal input and output should not be square waves. That would indicate overdrive. They should both be nice looking sine waves with the output approaching but not hitting the rails. The crystal circuit should not be a source of harmonic radiation.

    I like to keep the xtal traces within 300 mils and definitely all other traces with fast transitions angled away. I usually leave the ground plane under those traces and allow for a couple extra pF in the loading. One nice thing about the Prop is that you don't have to find a place to put the capacitors or where to ground them.
  • idbruceidbruce Posts: 6,197
    edited 2012-11-15 08:08
    Here's the deal... I need to add a few more resistors to my design and board space is pretty cramped, especially since it is all through hole and I like horizontal mounted resistors, as compared to vertical mounted resistors. In the image shown below, within the red bounding rectangle, as far as I can readily determine, I will have to install (3) more resistors, (1) two pin header, and (1) three pin header. So needless to say that it is going to be tight. As you can see in the image, I have rotated the crystal away from the XO and XI pins to gain a little more room. The combined length of the traces going from the crystal to the XI pin is 0.437" and the length of the trace going to XO is 0.205".

    Bruce

    EDIT: Additionally, this is a one layer design.
    285 x 381 - 17K
  • Mike CookMike Cook Posts: 829
    edited 2012-11-15 08:20
    In some of my through hole designs I have hidden the crystal under the propeller. Of course that assumes that you are mounting the propeller in a socket. :>)
  • idbruceidbruce Posts: 6,197
    edited 2012-11-15 08:31
    @Mike Cook
    In some of my through hole designs I have hidden the crystal under the propeller. Of course that assumes that you are mounting the propeller in a socket. :>)

    Yea that is a nice thought, but I am trying to keep it at bare bones minimum. However, if I don't have enough room to add the other components and route the necessary traces, that definitely sounds like a quick remedy. I have read about that trick somewhere before, but I had forgotten about it. Thanks for reminding me Mike.

    Bruce
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2012-11-15 10:10
    The crystal input and output should not be square waves. That would indicate overdrive. They should both be nice looking sine waves with the output approaching but not hitting the rails. The crystal circuit should not be a source of harmonic radiation.

    I like to keep the xtal traces within 300 mils and definitely all other traces with fast transitions angled away. I usually leave the ground plane under those traces and allow for a couple extra pF in the loading. One nice thing about the Prop is that you don't have to find a place to put the capacitors or where to ground them.

    Okay, but internally - the first thing that happens to that sine wave is it is converted to a square wave and then passed down the line. What you imply is that only the fundamental frequency will be emitted from the crystal leads. Since these are driven by inverted logic, I thought that in might be closer to a triangular wave that is commonly seen in relaxation oscillators.

    Use a 3 pin surface mount resonator if space is at a premium. No additional capacitors and very small. And if it is a single sided circuit board, that will all go on the underside very nicely. Or does the Propeller have to use a 2 pin resonator? That would be even easier.
  • Mark_TMark_T Posts: 1,981
    edited 2012-11-15 11:52
    XI looks a pretty good sine, XO isn't so perfect, but much closer to sine than either square or triangle wave. Its important a crystal oscillator damps down harmonics to prevent unintended overtone oscillation (assuming a fundamental mode xtal).
  • TubularTubular Posts: 4,703
    edited 2012-11-15 14:49
    idbruce wrote: »
    Here's the deal... I need to add a few more resistors to my design and board space is pretty cramped, especially since it is all through hole and I like horizontal mounted resistors, as compared to vertical mounted resistors. In the image shown below, within the red bounding rectangle, as far as I can readily determine, I will have to install (3) more resistors, (1) two pin header, and (1) three pin header. So needless to say that it is going to be tight. As you can see in the image, I have rotated the crystal away from the XO and XI pins to gain a little more room. The combined length of the traces going from the crystal to the XI pin is 0.437" and the length of the trace going to XO is 0.205".

    Bruce

    EDIT: Additionally, this is a one layer design.

    If its just a crystal mounted at right angles to the prop (.5" trace length), I do this often and have never had an issue across several designs.
  • jmgjmg Posts: 15,173
    edited 2012-11-15 14:58
    idbruce wrote: »
    The combined length of the traces going from the crystal to the XI pin is 0.437" and the length of the trace going to XO is 0.205".

    That is unlikely to be a problem.
    A purist might spin the Xtal 180' so the XI lead is the shortest, as the impedance of that is nominally higher than XO,but those are both short leads.
  • idbruceidbruce Posts: 6,197
    edited 2012-11-15 17:11
    @Tubular and jmg
    If its just a crystal mounted at right angles to the prop (.5" trace length), I do this often and have never had an issue across several designs.
    That is unlikely to be a problem.

    Well that's is good to here! That is just the answer I was looking for :) From what I gather, it is not ideal, but it is just one of those situations, where you are darned if you don't.

    Bruce
  • Tracy AllenTracy Allen Posts: 6,664
    edited 2012-11-15 18:47
    Here is a shot of the crystal XIand XO pins on the Demo Board. Yellow is XI.
    propDemoBrdXtal.png


    As it happened, I was looking at a lot of crystal signals today, not from the Prop, but from a 32kHz xtal on the timer1 LP oscillator on a PIC12F675. Lots of variation in startup time and amplitude on 25 boards.
    640 x 480 - 17K
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2012-11-15 23:18
    If you are doing a TH design please consider using cylindrical crystals as they not only take up a lot less room but you can place the legs of the crystal right up next to the pads since the spacing of the leads are less than 0.1". I use 10MHz all the time in commercial equipment as they are easier to get in all kinds of packages but I have also used 5MHz cylindrical crystals too. If you allow for a grounded pad at the other end of the crystal you can solder it down and shield the package at the same time.
Sign In or Register to comment.