Shop OBEX P1 Docs P2 Docs Learn Events
I would like to run a Prop and an SX28 off of the same crystal. — Parallax Forums

I would like to run a Prop and an SX28 off of the same crystal.

plainsteveplainsteve Posts: 33
edited 2011-11-01 15:37 in Propeller 1
What is the feasibility? Any caveats? I'm trying to save costs on a board design.

Comments

  • Beau SchwabeBeau Schwabe Posts: 6,568
    edited 2011-10-28 20:43
    As long as they are close to one another (1 inch or less) you shouldn't have any loading effects. I have run two Propellers this way before. Basically run one Propeller as you normally would and take the crystal OUTPUT (Propeller Pin 31) from that Propeller to drive the crystal INPUT (Propeller Pin 30) of the other Propeller. In your case, the SX. Suppose you could run it the other way, and have the crystal output of the SX driving the crystal input of the Propeller. Either way keep your distance short.
  • plainsteveplainsteve Posts: 33
    edited 2011-10-28 20:46
    Awesome. Thanks, Beau.
  • Toby SeckshundToby Seckshund Posts: 2,027
    edited 2011-10-29 02:39
    Just be aware that if the Prop that acts as the master oscillator gets reset then the Xtal bit gets stopped whilst it gets through the RCFast boot phase. I do not know how the SX acts but it could be better to have that as the oscillator and feed the Prop.

    I had two Props slaved together once but put on separate reset buttons (for some reason) if the master oscillator got reset then the slave one lost its source and crashed, and didn't pick up again on getting its 5MHz back. If both Props got a commoned reset then all seemed ok
  • Cluso99Cluso99 Posts: 18,069
    edited 2011-10-29 03:23
    Beau: I guess you should know but I have always been advised this is not good enngineering practice and fraught with danger. While I realise the xtal circuitry has changed over the years, capacitance and noise are still issues.
  • plainsteveplainsteve Posts: 33
    edited 2011-10-29 18:48
    @Toby; Good tip. Although I'm not sure (yet), I would assume that since the SX does not boot from external program code, there will not be a time after the SX powers up in which no oscillator output is present. The crystal oscillator settings are configured via FLASH bits sent during device programming. Since this does not seem like a good thing to test on a breadboard, it will have to wait until I am not one seriously unemployed dude so I can have some PCBs made, etc.
  • Toby SeckshundToby Seckshund Posts: 2,027
    edited 2011-10-30 08:47
    If the SX's oscillator section is anything like an AVR's then the signal would be up and ready long before the Prop had got through its booting phase.

    A separate oscillator block would save any of these problems but both would limit the frequency available to the SX to 4-8MHz (officially). I have no experience on what the SX requires.
  • plainsteveplainsteve Posts: 33
    edited 2011-10-30 10:39
    If I have to, I can use the SX's built-in 4MHz oscillator. I just saw sharing a 6.25 MHz crystal as a way to get a couple more MHz from the SX.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2011-10-30 10:44
    The other option is to drive the SX's clock input from a counter-driven Propeller pin. It requires an extra pin, of course, but you get your choice of output frequencies that way and there are no loading/capacitance issues to contend with.

    -Phil
  • plainsteveplainsteve Posts: 33
    edited 2011-10-31 15:57
    @Phil: In this application, the SX boots the Propeller, and I don't believe one can change the clock source of the SX at run time.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2011-10-31 16:05
    In that case, the SX would not even receive a clock from the Prop's XO pin until after it boots, since the program that runs in the Prop has to configure the oscillator. Just attaching a crystal will not, of itself, produce oscillation.

    -Phil
  • plainsteveplainsteve Posts: 33
    edited 2011-11-01 08:07
    @Phil: Correct, which is why I thought I would go the other way, SX->Prop. :)
  • Toby SeckshundToby Seckshund Posts: 2,027
    edited 2011-11-01 08:53
    In my case I decided that it just wasn't worth the hassle, and fitted a second Xtal. Having a common Xtal would save small amount of board acreage, and keep both sides syncronous.

    I was intrigued it that whilst the one Xtal was common to both Props, a commoned reset to both props or power up didn't give any problems. I would have expected, given the vast differences of RCFast specs, that one would have booted before the other. Perhaps by chance the "master" was a fraction quicker and so the "slave had a 5MHz signal waiting for it. Unfortunately, as with most of my efforts, that PCB has been recycled long ago so i can not swap things around to see.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2011-11-01 09:01
    If you're going to share crystal pins between the two chips, don't forget that large voltages can be present on those pins while programming the SX. IIRC, the SX has at least one counter output that could be used instead.

    -Phil
  • plainsteveplainsteve Posts: 33
    edited 2011-11-01 15:37
    Phil said:
    ...don't forget that large voltages can be present on those pins while programming the SX...

    Smile.
Sign In or Register to comment.