Forums

Connecting a crystal to a Cyclone or Max PLD

Started by David Brown May 1, 2004
Is it possible to connect a crystal to an Altera Cyclone or a Max pld rather
an an external oscillator?  And if so, is it possible to use a low frequency
crystal as a reference for the Cyclone PLLs, or do they require a high
minimum frequency?

--
David

"I love deadlines.  I love the whooshing noise they make as they go past."
Douglas Adams



David Brown wrote:
> Is it possible to connect a crystal to an Altera Cyclone or a Max pld rather > an an external oscillator?
Not really. You *might* be able to use a couple of pins and create an inverter between them and turn this into an oscillator. Of course, this sort of oscillator depends on using the "linear" region of an inverter which a CPLD or FPGA may not possess (ie, I wouldn't count on this working).
> And if so, is it possible to use a low frequency > crystal as a reference for the Cyclone PLLs, or do they require a high > minimum frequency?
The Cyclone only needs a high frequency if you use the PLL. Otherwise, you can use any arbitrarily low frequency as a clock for the Cyclone and/or MAX PLDs.
> > -- > David > > "I love deadlines. I love the whooshing noise they make as they go past." > Douglas Adams > >
Marc Guardiani wrote:

> David Brown wrote:
>> Is it possible to connect a crystal to an Altera Cyclone or a
>> Max pld rather an an external oscillator?
> Not really. You *might* be able to use a couple of pins and create an > inverter between them and turn this into an oscillator. Of course, this > sort of oscillator depends on using the "linear" region of an inverter > which a CPLD or FPGA may not possess (ie, I wouldn't count on this > working).
Does it really operate in the linear region? I would have thought that it depended on the propagation delay not being too large, but that more gain wouldn't be a problem. The ones I used to know in CD4000 CMOS days used three inverters in series to get, I thought, more gain. -- glen
glen herrmannsfeldt wrote:

> Marc Guardiani wrote: > >> David Brown wrote: > > >>> Is it possible to connect a crystal to an Altera Cyclone or a > > >> Max pld rather an an external oscillator? > >> Not really. You *might* be able to use a couple of pins and create an >> inverter between them and turn this into an oscillator. Of course, >> this sort of oscillator depends on using the "linear" region of an >> inverter which a CPLD or FPGA may not possess (ie, I wouldn't count on >> this working). > > > Does it really operate in the linear region? I would have thought > that it depended on the propagation delay not being too > large, but that more gain wouldn't be a problem. The ones I > used to know in CD4000 CMOS days used three inverters in > series to get, I thought, more gain.
It should operate in the linear region for best oscillator performance. It will oscillate with more chained-buffers, but then you have more elements that the XTAL determining the frequency :) One problem is 'edge-fur' or multiple edge transistions : the Xtal spins at the expected frequency, but the slew/edge specs fail at the Logic threshold, and >> 100MHz burst oscillations can result. Very process and temperature dependant. Not nice on a clock :) Pins with Hysteresis solve the transistion oscillation problem, but moves the issue to one of two oscillation elements in parallel : The crystal, and also the RC-Schmitt bias feedback element. ( remove the Xtal, and it still oscillates just fine !) For a small solution that lets you use a Xtal, take a look at http://www.semiconductors.philips.com/cgi-bin/pldb/pip/74LVC1GX04GV.html -jg
"Jim Granville" <no.spam@designtools.co.nz> wrote in message
news:LrZkc.885$s3.102775@news02.tsnz.net...
> Pins with Hysteresis solve the transistion oscillation problem, but > moves the issue to one of two oscillation elements in parallel : > The crystal, and also the RC-Schmitt bias feedback element. > ( remove the Xtal, and it still oscillates just fine !) >
Not only that, but the xtal is capacitive, and forms a divider with the input-load capacitor. If you take a CoolrunnerXL and try to use a clock input for input (since it has no pullup or bus hold), the shoot through is enough to overcome the hysteresis, giving you a 100+MHz oscillator. You can try to tweak it by adding series resistors but then the darn thing won't oscillate. Been there, redone that. It was power-ramp dependant, temperature dependant, look-at-dependant and debug-unfriendly. /Kasper Digital people should leave their digital shoes behind when wandering into the analog domain.
> > Been there, redone that. It was power-ramp dependant, temperature
dependant,
> look-at-dependant and debug-unfriendly. >
Ah well, it looks like the answer to my question is "no" - at least if I want the card to work reliably! Thanks to those that replied. David
"David Brown" <david@no.westcontrol.spam.com> wrote in message news:<c74svr$fv3$1@news.netpower.no>...
> > > > Been there, redone that. It was power-ramp dependant, temperature > dependant, > > look-at-dependant and debug-unfriendly. > > > > Ah well, it looks like the answer to my question is "no" - at least if I > want the card to work reliably! > > Thanks to those that replied. > > David
David, We have had some customers try the crystal-to-the-FPGA approach over time, and it's generally not successful for the reasons the other posters have listed. To answer your other question:
>>is it possible to use a low frequency crystal as a reference for the
Cyclone PLLs, or do they require a high minimum frequency? The minimum input frequency for the Cyclone PLL is 15.625 MHz. Sincerely, Greg Steinke gregs@altera.com Altera Corporation
Driving a crystal from an PLD device.

Since this question pops up again and again, maybe it deserves a better
explanation.

A crystal is usually connected as a Colpitts oscillator, where the IC
provides the first 180 degree phase shift, and the xtal plus external RC
combine for the remaining 180 degrees. The total circuit loop must have 360
degree phase shift and a gain of exactly 1.0. That is the condition for
stable oscillation.

XC3000 had such a single-stage amplifier, and could implement an oscillator
with just a crystal, two capacitors and two resistors.
But there were lots of problems when users connected obscure crystals,
ranging from 32 kHz to 100 MHz. Most digital designers lack even the most
rudimentary understanding of oscillators, why they require a single
amplifier stage, and why they cannot reliably be implemented with the
multi-stage amplifier typically between an input and an output of a modern
CMOS IC.

So, please, don't even try. You will not be able to design a reliable xtal
oscillator this way, one that starts and runs reliably, and does not break
out in wild harmonic or non-harmonic oscillations.

Finally: Packaged oscillators are cheap, just pennies more than the simple
xtal. It does not make sense to jeopardize your design for the $ 0.25 saved
by using a naked crystal. Let the oscillator manufacturers sweat out all
those analog details, they are good at it. Us digital folks are not.

Peter Alfke

> From: gregs@altera.com (Greg Steinke) > Organization: http://groups.google.com > Newsgroups: comp.arch.fpga > Date: 3 May 2004 13:59:03 -0700 > Subject: Re: Connecting a crystal to a Cyclone or Max PLD > > "David Brown" <david@no.westcontrol.spam.com> wrote in message > news:<c74svr$fv3$1@news.netpower.no>... >>> >>> Been there, redone that. It was power-ramp dependant, temperature >> dependant, >>> look-at-dependant and debug-unfriendly. >>> >> >> Ah well, it looks like the answer to my question is "no" - at least if I >> want the card to work reliably! >> >> Thanks to those that replied. >> >> David > > David, > We have had some customers try the crystal-to-the-FPGA approach over > time, and it's generally not successful for the reasons the other > posters have listed. > > To answer your other question: >>> is it possible to use a low frequency crystal as a reference for the > Cyclone PLLs, or do they require a high minimum frequency? > > The minimum input frequency for the Cyclone PLL is 15.625 MHz. > > Sincerely, > Greg Steinke > gregs@altera.com > Altera Corporation
Peter Alfke wrote:



> A crystal is usually connected as a Colpitts oscillator, where the IC > provides the first 180 degree phase shift, and the xtal plus external RC > combine for the remaining 180 degrees. The total circuit loop must have 360 > degree phase shift and a gain of exactly 1.0. That is the condition for > stable oscillation.
Is this for series resonant crystals? I am trying to remember the difference in the oscillator for series and parallel resonant crystals.
> XC3000 had such a single-stage amplifier, and could implement an oscillator > with just a crystal, two capacitors and two resistors. > But there were lots of problems when users connected obscure crystals, > ranging from 32 kHz to 100 MHz. Most digital designers lack even the most > rudimentary understanding of oscillators, why they require a single > amplifier stage, and why they cannot reliably be implemented with the > multi-stage amplifier typically between an input and an output of a modern > CMOS IC.
The ones I remember from the 1970's used three CMOS inverters, I think more reliably than using just one. An additional inverter was used as a buffer between the crystal and the rest of the circuit. I can see that unusual results would happen as the propagation delay through the inverters approached half the period.
> So, please, don't even try. You will not be able to design a reliable xtal > oscillator this way, one that starts and runs reliably, and does not break > out in wild harmonic or non-harmonic oscillations.
The worst crystal problems I ever had were trying to get an 8284 clock generator to run at 8MHz using a 24MHz crystal. (It has a divide by three in it.) That was to run an 80287. I finally found another crystal that wasn't much lower frequency and ran reliably. That was for a circuit that was designed to be a crystal oscillator! -- glen
Every xtal has parallel as well as series resonance. These two frequencies
are very close together, and the typical Colpitts oscillator actually
oscillates at a frequency in-between.
For most typical low-precision applications, the difference between parallel
and series resonance is irrelevant for the user. The crystal just picks a
point in-between.
Peter Alfke 
===============
>> A crystal is usually connected as a Colpitts oscillator, where the IC >> provides the first 180 degree phase shift, and the xtal plus external RC >> combine for the remaining 180 degrees. The total circuit loop must have 360 >> degree phase shift and a gain of exactly 1.0. That is the condition for >> stable oscillation. > > Is this for series resonant crystals? I am trying to remember > the difference in the oscillator for series and parallel resonant > crystals. > >