EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

Digital Crystal Oscillator

Started by rickman December 27, 2010
I've read the Green Arrays web page app note on using a pin to turn a
crystal into an oscillator at

http://www.greenarrays.com/home/documents/pub/AP002-OSC.html

Although the work they did seems to work well enough, they stopped
working on the project a long way short of having an actual
oscillator.  I've been trying to run a spice simulation to explore
this concept and finding that an oscillator is not so easy to
design... as I already knew.

Has anyone designed what I would call a digital crystal oscillator
before?  Using Google I didn't find anything that actually uses
digital logic, or in this case software to act as the amplifier of a
crystal oscillator.  Many designs use an inverter as an amplifier,
either from a digital logic chip or contained within a digital chip
like a MCU.  But I can't seem to find any mention of an oscillator
that uses a "kick" from a truly digital controller.

From the simulations I have done, I am finding it hard to create just
the right conditions to make this idea work.  Anyone know anything
about how to make a crystal oscillate using a digital drive
controller?

Rick
"rickman" <gnuarm@gmail.com> wrote in message 
news:3cddddcb-79d9-4d79-ba44-c1dede31dfe2@z19g2000yqb.googlegroups.com...
> I've read the Green Arrays web page app note on using a pin to turn a > crystal into an oscillator at > > http://www.greenarrays.com/home/documents/pub/AP002-OSC.html > > Although the work they did seems to work well enough, they stopped > working on the project a long way short of having an actual > oscillator. I've been trying to run a spice simulation to explore > this concept and finding that an oscillator is not so easy to > design... as I already knew. > > Has anyone designed what I would call a digital crystal oscillator > before? Using Google I didn't find anything that actually uses > digital logic, or in this case software to act as the amplifier of a > crystal oscillator. Many designs use an inverter as an amplifier, > either from a digital logic chip or contained within a digital chip > like a MCU. But I can't seem to find any mention of an oscillator > that uses a "kick" from a truly digital controller. > > From the simulations I have done, I am finding it hard to create just > the right conditions to make this idea work. Anyone know anything > about how to make a crystal oscillate using a digital drive > controller? >
I started to get lost about half way through your posting. There are plenty of schematics on the web for 'crystal oscillators' using ICs, both analog and logic, but the post seems to be referencing something different, more like the feedback loops that are used with atomic clocks. These keep a reference cell containing something like Cesium at a resonant point, by some sort of peak detection principle. It's way more complex than simply closing a gain loop around the resonant element and letting the whole thing oscillate by itself. If you need something other than that, you need to explain exactly what alternative characteristics are important for you. I can't imagine why a simple oscillator wouldn't suffice unless your requirements are specialised.
On Sun, 26 Dec 2010 20:46:26 -0800, rickman wrote:

> I've read the Green Arrays web page app note on using a pin to turn a > crystal into an oscillator at > > http://www.greenarrays.com/home/documents/pub/AP002-OSC.html > > Although the work they did seems to work well enough, they stopped > working on the project a long way short of having an actual oscillator. > I've been trying to run a spice simulation to explore this concept and > finding that an oscillator is not so easy to design... as I already > knew. > > Has anyone designed what I would call a digital crystal oscillator > before? Using Google I didn't find anything that actually uses digital > logic, or in this case software to act as the amplifier of a crystal > oscillator. Many designs use an inverter as an amplifier, either from a > digital logic chip or contained within a digital chip like a MCU. But I > can't seem to find any mention of an oscillator that uses a "kick" from > a truly digital controller. > > From the simulations I have done, I am finding it hard to create just > the right conditions to make this idea work. Anyone know anything about > how to make a crystal oscillate using a digital drive controller?
Either they never got it working, or they suddenly realized in all their babbling about "making extra components do their work" that they were replacing --> one stinking transistor <-- with a bazzilion of them. From the general tone of the article, either they don't know what the heck they're doing, or they're _really_ talking down to the audience. Their surprise at needing to give a crystal -- famous for being a Really High Q Device -- lots of cycles of excitation before they see an output tends to indicate happy ignorance rather than arrogant competence. If they were driving the pin directly into the crystal at its series resonant frequency they were probably way over-exciting it. Making a single-pin crystal oscillator is probably doable. Particularly if you're willing to go for the crystal's parallel resonance mode, you should be able to set up a pure negative resistance at a pin, turn it on, and stand back. Figuring out the complications is, of course, left as an exercise to the reader. -- http://www.wescottdesign.com
rickman wrote:
> I've read the Green Arrays web page app note on using a pin to turn a > crystal into an oscillator at > > http://www.greenarrays.com/home/documents/pub/AP002-OSC.html > > Although the work they did seems to work well enough, they stopped > working on the project a long way short of having an actual > oscillator. I've been trying to run a spice simulation to explore > this concept and finding that an oscillator is not so easy to > design... as I already knew. > > Has anyone designed what I would call a digital crystal oscillator > before? Using Google I didn't find anything that actually uses > digital logic, or in this case software to act as the amplifier of a > crystal oscillator. Many designs use an inverter as an amplifier, > either from a digital logic chip or contained within a digital chip > like a MCU. But I can't seem to find any mention of an oscillator > that uses a "kick" from a truly digital controller. > > From the simulations I have done, I am finding it hard to create just > the right conditions to make this idea work. Anyone know anything > about how to make a crystal oscillate using a digital drive > controller?
If you were hell-bent on using a single pin for the crystal, I'd think that it would be cheaper and easier to use an internal clock for whatever it is you need a clock for and periodically shock the crystal into resonance, measure the frequency over n cycles and sync your internal clock to it.
On Dec 27, 2:22 pm, Jim Stewart <jstew...@jkmicro.com> wrote:
> rickman wrote: > > I've read the Green Arrays web page app note on using a pin to turn a > > crystal into an oscillator at > > >http://www.greenarrays.com/home/documents/pub/AP002-OSC.html > > > Although the work they did seems to work well enough, they stopped > > working on the project a long way short of having an actual > > oscillator. I've been trying to run a spice simulation to explore > > this concept and finding that an oscillator is not so easy to > > design... as I already knew. > > > Has anyone designed what I would call a digital crystal oscillator > > before? Using Google I didn't find anything that actually uses > > digital logic, or in this case software to act as the amplifier of a > > crystal oscillator. Many designs use an inverter as an amplifier, > > either from a digital logic chip or contained within a digital chip > > like a MCU. But I can't seem to find any mention of an oscillator > > that uses a "kick" from a truly digital controller. > > > From the simulations I have done, I am finding it hard to create just > > the right conditions to make this idea work. Anyone know anything > > about how to make a crystal oscillate using a digital drive > > controller? > > If you were hell-bent on using a single pin > for the crystal, I'd think that it would be > cheaper and easier to use an internal clock > for whatever it is you need a clock for and > periodically shock the crystal into resonance, > measure the frequency over n cycles and sync > your internal clock to it.
What internal clock? I don't know that I am "hell-bent" on using a single pin. But I can't think of a simple way to do any better using two pins. One issue is whether the input pin will need to be biased near the threshold and, if so, how to do it. I think this can only be done using two pins, but I'm not sure. Rick
On Dec 29, 7:17=A0am, rickman <gnu...@gmail.com> wrote:
> > What internal clock?
Their paper looks to be based on a 'frequency seek' basis This is the statement I found most revealing: ["We have to hit the right period =B11 count in order to hit the resonance, and the peak to peak voltage immediately drops by a factor of two or more when we are off this peak. Given that the period is on the order of 12000 counts, this means the useful resonance is on the order of 250 parts per million in period variation. "] So, yes, it can be made to work, BUT to 'lock' to 32KHz, they need 12000 counts per period, and that maps to ~393MHz. So it certainly makes no power-budget sense to be doing this. You get the worlds highest power, and most complex, 32KHz oscillator ;)
> I don't know that I am "hell-bent" on using a single pin. =A0But I can't > think of a simple way to do any better using two pins. =A0One issue is > whether the input pin will need to be biased near the threshold and, > if so, how to do it. =A0I think this can only be done using two pins, > but I'm not sure.
I've seen single pin ceramic resonator oscillators on Philips remote control devices, but that was a special cell, not a generic digital pin. We had some success in using a HC14 Schmitt, and a crystal with RC feedback. The RC oscillates, and self-biases the pin, and then the Crystal pulls and finally dominates the frequency. Caveats are you need to approach from below, but not too far below, and proving you _are_ crystal locked is non trivial. (Remove the Xtal, and this still oscillates!) It is still hard to meet any power budget doing this (Vanilla Logic pins have lousy thru currents), and a current-feed inverter is the best topology for low power crystal. It gets hard to improve on 74LVC1GX04 / 74AUP1Z04 type devices. Multi sourced, and reliable, and a tolerable price. (tho why they cost more than a 2G17, has to be pure marketing...) -jg
> I don't know that I am "hell-bent" on using a single pin. But I can't > think of a simple way to do any better using two pins. One issue is > whether the input pin will need to be biased near the threshold and, > if so, how to do it. I think this can only be done using two pins, > but I'm not sure.
Single pin crystal oscillators for ICs do exist. Ferranti/Interdesign did it that way: http://www.embeddedforth.de/temp/cr.pdf I remember Mitel had a 1 pin circuit in 1988 for their MT3070/MT3071 8 pin DTMF receivers in the sample datasheet. By the time these went into production it was a normal 2 pin gate oscillator again ... MfG JRD
malcolm wrote:

[...]

> We had some success in using a HC14 Schmitt, and a crystal with RC >feedback. The RC oscillates, and self-biases the pin, and then the >Crystal pulls and finally dominates the frequency.
With only _one_ connection to the XTAL-capacitor-network? Or the usual Pierce circuit? [...]
> It gets hard to improve on 74LVC1GX04 / 74AUP1Z04 type devices.
It's trivial to build a reliable crystal oscillator with a single BJT and two capacitors. Oliver -- Oliver Betz, Muenchen (oliverbetz.de)
On Dec 29, 3:44=A0pm, Oliver Betz <OB...@despammed.com> wrote:
> It's trivial to build a reliable crystal oscillator with a single BJT > and two capacitors.
With the right transistor (or JFET) it is possible with only one capacitor.
Rocky wrote:

>> It's trivial to build a reliable crystal oscillator with a single BJT >> and two capacitors.
I forgot to mention two resistors.
>With the right transistor (or JFET) it is possible with only one >capacitor.
I also count parasitic capacitance as "capacitor". Oliver -- Oliver Betz, Muenchen (oliverbetz.de)

The 2024 Embedded Online Conference