Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Crystal Input to FPGA

411 views
Skip to first unread message

Nagaraj

unread,
Sep 10, 2003, 8:48:28 AM9/10/03
to
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

Jonathan Bromley

unread,
Sep 10, 2003, 9:16:48 AM9/10/03
to

"Nagaraj" <nagar...@yahoo.com> wrote in message
news:91710219.03091...@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...@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.

Peter Alfke

unread,
Sep 10, 2003, 12:24:51 PM9/10/03
to Nagaraj
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
====================

Jan Panteltje

unread,
Sep 10, 2003, 7:16:33 PM9/10/03
to
nagar...@yahoo.com (Nagaraj) wrote in message news:<91710219.03091...@posting.google.com>...

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

Peter Alfke

unread,
Sep 10, 2003, 7:59:32 PM9/10/03
to Jan Panteltje
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
============

Glen Herrmannsfeldt

unread,
Sep 10, 2003, 9:14:55 PM9/10/03
to

"Nagaraj" <nagar...@yahoo.com> wrote in message
news:91710219.03091...@posting.google.com...

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


rickman

unread,
Sep 10, 2003, 10:06:21 PM9/10/03
to

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.c...@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

Glen Herrmannsfeldt

unread,
Sep 11, 2003, 10:53:15 PM9/11/03
to

"rickman" <spamgo...@yahoo.com> wrote in message
news:3F5FD89D...@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


rickman

unread,
Sep 12, 2003, 12:57:31 AM9/12/03
to

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.

Brian Drummond

unread,
Sep 12, 2003, 2:17:23 PM9/12/03
to
On Wed, 10 Sep 2003 22:06:21 -0400, rickman <spamgo...@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

Hal Murray

unread,
Sep 12, 2003, 8:36:21 PM9/12/03
to
>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.

Fox has custom frequency oscillators availably at reasonably cost and
reasonably quickly.
http://www.foxonline.com/jitomain.htm

I expect there are others.

--
The suespammers.org mail server is located in California. So are all my
other mailboxes. Please do not send unsolicited bulk e-mail or unsolicited
commercial e-mail to my suespammers.org address or any of my other addresses.
These are my opinions, not necessarily my employer's. I hate spam.

Daniel Lang

unread,
Sep 12, 2003, 8:43:42 PM9/12/03
to
"Brian Drummond" <br...@shapes.demon.co.uk> wrote in message > 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

Digi-Key carries several brands of off the shelf oscillators that they
can program to your custom frequencies (qty = 1).

Daniel Lang

Ray Andraka

unread,
Sep 19, 2003, 3:39:02 PM9/19/03
to
Don't do it. Use a crystal oscillator instead. The reason is that the
"inverter" created from FPGA resources between two pins consists of many
gain stages. In order for the crystal oscillator to work, the inverter
has to get biased into its active region. The string of logic gates
required to get an invert function between two FPGA pins involves too many
stages for it to reliably have a linear range, so the oscillator at best
will function only under some conditions. The old families had an
unbuffered inverter available at the pins.

Nagaraj wrote:

--
--Ray Andraka, P.E.
President, the Andraka Consulting Group, Inc.
401/884-7930 Fax 401/884-7950
email r...@andraka.com
http://www.andraka.com

"They that give up essential liberty to obtain a little
temporary safety deserve neither liberty nor safety."
-Benjamin Franklin, 1759


0 new messages