FPGARelated.com
Forums

Crystal Input to FPGA

Started by Nagaraj September 10, 2003
Hi,
   I want to interface a crystal to a Xilinx FPGA. Earlier Xilinx FPGA
devices like XC2000 series had crystal input provision which is not
there in Spartan 30K gate device which I am using for my design.
   I want to know how to build an oscillator circuit (amplifier) for
the crystal in FPGA.
   Any references?

Regards,
Nagaraj
"Nagaraj" <nagaraj_c_s@yahoo.com> wrote in message
news:91710219.0309100448.6e8ab050@posting.google.com...

> I want to interface a crystal to a Xilinx FPGA. Earlier Xilinx FPGA > devices like XC2000 series had crystal input provision which is not > there in Spartan 30K gate device which I am using for my design. > I want to know how to build an oscillator circuit (amplifier) for > the crystal in FPGA.
Don't mess around. Buy a packaged oscillator. The price of the oscillator is about three orders of magnitude lower than the value of the headaches you will get from not using one. -- Jonathan Bromley, Consultant DOULOS - Developing Design Know-how VHDL * Verilog * SystemC * Perl * Tcl/Tk * Verification * Project Services Doulos Ltd. Church Hatch, 22 Market Place, Ringwood, Hampshire, BH24 1AW, UK Tel: +44 (0)1425 471223 mail: jonathan.bromley@doulos.com Fax: +44 (0)1425 471573 Web: http://www.doulos.com The contents of this message may contain personal views which are not the views of Doulos Ltd., unless specifically stated.
Don't do it!
In XC3000 we had a single-stage amplifier between two pins, and that
worked kind of ok with most crystals. But there were problems with very
low frequencies (like 32 kHz) and some overtone designs. We (i.e.I) got
dragged into many complicated analog discussions, so we never offered
such a circuit again. If you implement an inverter from one input pin to
an output pin, you actually have more than half a dozen stages cascaded
(that's the way we build our input and output buffers) and that is not a
healthy arrangement for a reliable oscillator that always starts and
never goes into spurious odcillations. It might work in the lab, but is
not good for production.
Buy a complete oscillator can. You can buy them retail for <$1, and they
always work and draw little power.

Peter Alfke, Xilinx Applications
====================
Nagaraj wrote:
> > Hi, > I want to interface a crystal to a Xilinx FPGA. Earlier Xilinx FPGA > devices like XC2000 series had crystal input provision which is not > there in Spartan 30K gate device which I am using for my design. > I want to know how to build an oscillator circuit (amplifier) for > the crystal in FPGA. > Any references? > > Regards, > Nagaraj
nagaraj_c_s@yahoo.com (Nagaraj) wrote in message news:<91710219.0309100448.6e8ab050@posting.google.com>...
> Hi, > I want to interface a crystal to a Xilinx FPGA. Earlier Xilinx FPGA > devices like XC2000 series had crystal input provision which is not > there in Spartan 30K gate device which I am using for my design. > I want to know how to build an oscillator circuit (amplifier) for > the crystal in FPGA. > Any references? > > Regards, > Nagaraj
>Hi, > I want to interface a crystal to a Xilinx FPGA. Earlier Xilinx FPGA >devices like XC2000 series had crystal input provision which is not >there in Spartan 30K gate device which I am using for my design. > I want to know how to build an oscillator circuit (amplifier) for >the crystal in FPGA. > Any references? > >Regards, >Nagaraj >
mmm many people are paranoid about xtal oscillators it seems. Still I agree the small integrated DIL ones are cheap and easy, but for the ones who MUST use an xtal when all shops are closed, this solution has always worked for me: +5V | drain |---- ----------------------->| BF245 B | | | |---- | | === C |-----------0 to TTL level input | | |-------------| | | | | --- | | | | | = | | | | | --- | |100k | | | 1k5 |XTAL | === 2 C | | | | | -----------------------------------------0 It can drive a HCT7404 or such directly. Stability is very very good. The caps ratio is 1 to 2 C, values like 22 and 44 pF (2 22 in parallel) I use. If the drawing looks distorted use a fixed spacing font perhaps. I have uses this at 20MHz, 8.8MHz, 6 MHz, 100kHz, etc... Always works. Decauple the +5. The output looks like a sine wave, bit flatted, but very clean. If you want total separation, you can use a drain resistor and take the signal from there. Add a varicap with a small series cap parallel to the XTAL to make a voltage controlled oscillator for a PLL etc.. (For example color subcarrier lock). JP
This is a classical circuit that always works. Note that there is only a
single stage of amplification, a single transistor. So no weird
phase/gain characteristi, just a single stage with a 6dB per octave roll-off.
Unfortunately you cannot implement this between two FPGA pins. 
We added too much stuff (for a good reason, to serve normal applications ).
Peter Alfke
============
Jan Panteltje wrote:
> > > mmm many people are paranoid about xtal oscillators it seems. > Still I agree the small integrated DIL ones are cheap and easy, > but for the ones who MUST use an xtal when all shops are closed, > this solution has always worked for me: > > +5V > | drain > |---- > ----------------------->| BF245 B > | | | |---- > | | === C |-----------0 to TTL level input > | | |-------------| > | | | | > --- | | | | | > = | | | | | > --- | |100k | | | 1k5 > |XTAL | === 2 C | > | | | | > -----------------------------------------0 > > It can drive a HCT7404 or such directly. > Stability is very very good. > The caps ratio is 1 to 2 C, values like 22 and 44 pF (2 22 in parallel) > I use. > > If the drawing looks distorted use a fixed spacing font perhaps. > I have uses this at 20MHz, 8.8MHz, 6 MHz, 100kHz, etc... > Always works. > Decauple the +5. > The output looks like a sine wave, bit flatted, but very clean. > If you want total separation, you can use a drain resistor and take > the signal from there. > Add a varicap with a small series cap parallel to the XTAL to make a voltage > controlled oscillator for a PLL etc.. > (For example color subcarrier lock). > JP
"Nagaraj" <nagaraj_c_s@yahoo.com> wrote in message
news:91710219.0309100448.6e8ab050@posting.google.com...
> Hi, > I want to interface a crystal to a Xilinx FPGA. Earlier Xilinx FPGA > devices like XC2000 series had crystal input provision which is not > there in Spartan 30K gate device which I am using for my design. > I want to know how to build an oscillator circuit (amplifier) for > the crystal in FPGA. > Any references?
The oscillator that I used to know used three CMOS inverting gates in series with the crystal wrapped around them. Possibly some resistors, too. Usually one more gate to buffer and shape the result. Though I remember people having a hard time sometimes with the 32kHz crystals, it worked well for everything else. -- glen
Glen Herrmannsfeldt wrote:
> > "Nagaraj" <nagaraj_c_s@yahoo.com> wrote in message > news:91710219.0309100448.6e8ab050@posting.google.com... > > Hi, > > I want to interface a crystal to a Xilinx FPGA. Earlier Xilinx FPGA > > devices like XC2000 series had crystal input provision which is not > > there in Spartan 30K gate device which I am using for my design. > > I want to know how to build an oscillator circuit (amplifier) for > > the crystal in FPGA. > > Any references? > > The oscillator that I used to know used three CMOS inverting gates in series > with the crystal wrapped around them. Possibly some resistors, too. > Usually one more gate to buffer and shape the result. > > Though I remember people having a hard time sometimes with the 32kHz > crystals, it worked well for everything else.
But what is the advantage over an oscillator unless you are trying to squeze every penny out of the design? The difference between an oscillator and a crystal is less than $.50. -- Rick "rickman" Collins rick.collins@XYarius.com Ignore the reply address. To email me use the above address with the XY removed. Arius - A Signal Processing Solutions Company Specializing in DSP and FPGA design URL http://www.arius.com 4 King Ave 301-682-7772 Voice Frederick, MD 21701-3110 301-682-7666 FAX
"rickman" <spamgoeshere4@yahoo.com> wrote in message
news:3F5FD89D.D7B92959@yahoo.com...
> Glen Herrmannsfeldt wrote: > >
(snip about a crystal oscillator for use with FPGA's)
> > The oscillator that I used to know used three CMOS inverting gates in
series
> > with the crystal wrapped around them. Possibly some resistors, too. > > Usually one more gate to buffer and shape the result. > > > > Though I remember people having a hard time sometimes with the 32kHz > > crystals, it worked well for everything else. > > But what is the advantage over an oscillator unless you are trying to > squeze every penny out of the design? The difference between an > oscillator and a crystal is less than $.50.
Some people just don't like them, but otherwise I agree. -- glen
Glen Herrmannsfeldt wrote:
> > "rickman" <spamgoeshere4@yahoo.com> wrote in message > news:3F5FD89D.D7B92959@yahoo.com... > > Glen Herrmannsfeldt wrote: > > > > > (snip about a crystal oscillator for use with FPGA's) > > > > The oscillator that I used to know used three CMOS inverting gates in > series > > > with the crystal wrapped around them. Possibly some resistors, too. > > > Usually one more gate to buffer and shape the result. > > > > > > Though I remember people having a hard time sometimes with the 32kHz > > > crystals, it worked well for everything else. > > > > But what is the advantage over an oscillator unless you are trying to > > squeze every penny out of the design? The difference between an > > oscillator and a crystal is less than $.50. > > Some people just don't like them, but otherwise I agree.
I wouldn't know what there is not to like. An oscillator unit is smaller, simpler and works better than a crystal circuit you can design in just a few hours without extensive testing. If the cost difference is not an issue (such as production volumes below 10,000) I can't see how it would pay to design your own oscillator. Even with higher volume production, I bet the lower failure rate would make a self design not worth the effort. -- Rick "rickman" Collins rick.collins@XYarius.com Ignore the reply address. To email me use the above address with the XY removed. Arius - A Signal Processing Solutions Company Specializing in DSP and FPGA design URL http://www.arius.com 4 King Ave 301-682-7772 Voice Frederick, MD 21701-3110 301-682-7666 FAX
On Wed, 10 Sep 2003 22:06:21 -0400, rickman <spamgoeshere4@yahoo.com>
wrote:

>Glen Herrmannsfeldt wrote:
>> The oscillator that I used to know used three CMOS inverting gates in series >> with the crystal wrapped around them. Possibly some resistors, too. >> Usually one more gate to buffer and shape the result. > >But what is the advantage over an oscillator unless you are trying to >squeze every penny out of the design? The difference between an >oscillator and a crystal is less than $.50.
Off the shelf oscillators for standard frequencies are one thing. But when I was looking for custom frequencies I found manufacturers were happy to make small batch or even one-off crystals at a very respectable price; at the time, they didn't seem to be tooled up to make one-off oscillator modules - or at least they wanted much more money for the job. Maybe this has changed in the last few years. - Brian