Connecting a crystal to a Cyclone or Max PLD

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

Reply to
David Brown
Loading thread data ...

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).

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.

Reply to
Marc Guardiani

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

Reply to
glen herrmannsfeldt

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

formatting link

-jg

Reply to
Jim Granville

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.

Reply to
Kasper Pedersen

dependant,

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

Reply to
David Brown

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:

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 snipped-for-privacy@altera.com Altera Corporation

Reply to
Greg Steinke

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

Reply to
Peter Alfke

Is this for series resonant crystals? I am trying to remember the difference in the oscillator for series and parallel resonant crystals.

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.

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

Reply to
glen herrmannsfeldt

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 ===============

Reply to
Peter Alfke

Maybe not close enough if you are building a clock or frequency counter, but probably close enough for a CPU clock, I agree.

I agree that the frequencies are close. Different oscillator circuits work differently, and I wasn't sure which your description was about.

Also, some crystals are designed to run at a higher odd harmonic of the fundamental, which complicates things a little.

I once knew the difference between the two types of oscillators, but I don't remember it now.

-- glen

Reply to
glen herrmannsfeldt

For a basic tutorial, on xtal oscillators, see

formatting link

Peter Alfke

Reply to
Peter Alfke

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.