Internal vs external oscillator
northcove
Posts: 49
The Propeller ProtoBoard & PropStick both use an external 5MHz crystal. The Propeller also has internal fast (~12MHz) and slow (~20KHz) oscillators.
Q1: Other than power economy, what's the advantage of using a external oscillator that's slower than the internal oscillator?
Q2: Is the fastest Propeller configured using an 80MHz external crystal like this?
Q3: Is lowest power Propeller configured using no external crystal like this:
Q4: If current draw is directly proportional to MIPS, does RCSLOW mode consume orders of magnitude less power than xtal1+pll16x mode and an external crystal (assuming same number of active cogs, same current drawn from pin sourcing, etc.)
Thanks!
Q1: Other than power economy, what's the advantage of using a external oscillator that's slower than the internal oscillator?
Q2: Is the fastest Propeller configured using an 80MHz external crystal like this?
con _clkmode = xtal3 + pll16x _xinfreq = 80_000_000
Q3: Is lowest power Propeller configured using no external crystal like this:
con _clkmode = RCSLOW
Q4: If current draw is directly proportional to MIPS, does RCSLOW mode consume orders of magnitude less power than xtal1+pll16x mode and an external crystal (assuming same number of active cogs, same current drawn from pin sourcing, etc.)
Thanks!
Comments
Leon
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Amateur radio callsign: G1HSM
Suzuki SV1000S motorcycle
The best thing to do is a 5MHz crystal with the 16x PLL to achieve the 80MHz clock speed. You can also just use a 80MHz crystal with no PLL.
The benefit of the external crystal rather than the internal, is the precision. External crystal will typically be 20-30ppm which (+/- 0.00003%) , where the internal will vary wildly between chips and temperatures. So anything that is timing dependent (serial communication or frequency control) is very reliant on an accurate clock speed.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
April, 2008: when I discovered the answers to all my micro-computational-botherations!
When power consumption is an issue, highly optimized code, or PASM code, is a big deal. Profuse use of CTRs when possible will also help.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
April, 2008: when I discovered the answers to all my micro-computational-botherations!
Crystals and resonators generally can get down to 1%. Futher precision requires a special crystal oscillator that is in a controlled temperature environment. Those are expensive.
++++++
Back when the Propeller was released, external crystals and resonators were SOP. But many newer microcontrollers have managed to include more precise internal oscillators that work fine with asynchronous serial.
(Page 68 of the Propeller Manual Ver 1.2)
Come on...an XTAL oscillator will give do a lot better that 1 percent. Typically more like 100ppm or less. Watch crystals will get down to 20ppm or so. Oven controlled XTAL oscillators get down to about one part per billion.
I do precision freqency measurements (to the sub ppB) using the propeller with the PLL, there is very little jitter that I can detect.
If you go outside the lock range of 4MHz to 8MHz you will likely see much more than normal though.
Bean
On the plus side that jitter is put to good use in generating real random numbers on the Prop. A feat that no other micro I have heard of can do by itself.
-Phil
I'm just using a digital oscilloscope in equivelent time triggering on edges driven out a port by the cog counter.
Maybe it's your scope's sampling that's causing the appearance of 1 ns jitter, rather than the Prop itself. Also, the PLL does not "pump up" the crystal frequency. It uses a VCO with a free-running frequency of about 120 MHz that's divided down to match the crystal frequency for phase comparison. The result of that comparison is fed back to control the VCO for phase locking purposes.
-Phil
I think I'm okay with how the PLL module works comparing the divided down version of its internal VCO with the external crystal reference. From my user point of view it takes a slower crystal and effects a faster main clock. "pump up".
Now are the other answers good, I could feed an external can oscillator in at 80Mhz?
-Phil
what numbers do you get, using an 80MHz Oscillator module ?
1ns jitter is well below the Prop resolution of 12.5ns so it is hard to see that mattering for instrumentation measurements, but I could see that fixed RF use and mixers may be fussier, but that is a niche.
BTW. Welcome to the forum!
It's not a good idea to bring up such an old thread. You are better off to start a new one because things have changed over the years, and the info in the old thread may be, well old.
EDIT: I answered the question at 5:02AM EST this morning.
Sure, if you have one - see above.
Not easy to get 80MHz and low ppm at the same time, or does jitter matter more to you than ppm ?
You could also use something like Si5351 to generate 80.00MHz, and that can use a TXCO drive.