View Full Version : I would like to run a Prop and an SX28 off of the same crystal.
10-29-2011, 04:06 AM
What is the feasibility? Any caveats? I'm trying to save costs on a board design.
10-29-2011, 04:43 AM
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.
10-29-2011, 04:46 AM
Awesome. Thanks, Beau.
10-29-2011, 10:39 AM
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
10-29-2011, 11:23 AM
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.
10-30-2011, 02:48 AM
@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.
10-30-2011, 04:47 PM
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.
10-30-2011, 06:39 PM
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)
10-30-2011, 06:44 PM
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.
10-31-2011, 11:57 PM
@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)
11-01-2011, 12:05 AM
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.
11-01-2011, 04:07 PM
@Phil: Correct, which is why I thought I would go the other way, SX->Prop. :)
11-01-2011, 04:53 PM
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)
11-01-2011, 05:01 PM
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.
11-01-2011, 11:37 PM
...don't forget that large voltages can be present on those pins while programming the SX...