Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > sci.electronics.design > #377055

Re: Software Controlled Crystal Oscillator

From Martin Brown <|||newspam|||@nezumi.demon.co.uk>
Newsgroups sci.electronics.design
Subject Re: Software Controlled Crystal Oscillator
Date 2015-09-15 21:05 +0100
Organization Aioe.org NNTP Server
Message-ID <mt9tll$e66$1@speranza.aioe.org> (permalink)
References <mt841o$4m3$1@dont-email.me> <m4mdncHCAd5MV2rInZ2dnUVZ5r-dnZ2d@giganews.com> <mt8lbm$94h$1@speranza.aioe.org> <GuudnbjIJpn202XInZ2dnUVZ5sQAAAAA@giganews.com> <mt9pvo$71g$1@dont-email.me>

Show all headers | View raw


On 15/09/2015 20:04, rickman wrote:

> Green Arrays (GA) had an app note on making an oscillator from one I/O
> pin and a crystal, but it was very incomplete.  Chuck Moore tried using
> a 10 MHz crystal (iirc) but couldn't get it started, so used a ceramic
> resonator instead which worked well enough to drive a video monitor.
> Other apps are a bit more demanding, so a crystal is needed.  An
> external oscillator could be used of course, but this adds to the long
> list of external things needed to make the GA144 useful.
>
> Someone posting in the forth group made it work using a dither technique
> he calls the Bresenham algorithm which I believe was intended to
> calculate pixels for a straight line and is essentially the same as an
> NCO.  This gets around the issue of the resolution of a timing loop not
> being sufficient to start a crystal with its high Q.  But there are a
> million other aspects of making a crystal work *well* and I am no
> expert.  So I thought I would ask here.

OK. I start to see where you are coming from and where you might want to 
get to. The difficulty is that to make the crystal ring you are going to 
need something free running a fair bit faster so that you can match 
frequency with a well timed pulse within the Q ringing time.

Think of it like a pendulum and you need to kick it every so often at 
exactly the right time to keep the amplitude up. Depending on how long 
the crystal will ring for you may be able to calibrate its frequency 
against the free running core and then pick appropriate magic constants 
for repetition rate, delay after 0-1 transition and pulse width.

You are basically stuck with the resolution granularity of your timing 
loops but you can create a pseudo delay that differs by one cycle 
depending on the bit state of a free running counter (assuming here you 
have test bit and branch instructions). Every Nth loop with N carefully 
chosen you add in an extra cycle delay to make the pulse hit the right 
moment to excite the crystal correctly. Phase noise will be horrid.

Same with hitting top dead centre you can only detect the 0-1 and 1-0 
transitions but if you measure over 1024 of them you get a pretty good 
estimate of how many free running ticks per cycle of the crystal.

> If a chip were being designed, then yeah, just add an oscillator
> amplifier.  But the chip is done, work with what is available.
>
It might still be easier to feed it a nice reliable external crystal 
oscillator reference clock unless you enjoy pain.

-- 
Regards,
Martin Brown

Back to sci.electronics.design | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Software Controlled Crystal Oscillator rickman <gnuarm@gmail.com> - 2015-09-14 23:43 -0400
  Re: Software Controlled Crystal Oscillator Tim Wescott <tim@seemywebsite.com> - 2015-09-15 02:37 -0500
    Re: Software Controlled Crystal Oscillator rickman <gnuarm@gmail.com> - 2015-09-15 04:31 -0400
      Re: Software Controlled Crystal Oscillator Tim Wescott <seemywebsite@myfooter.really> - 2015-09-15 11:57 -0500
        Re: Software Controlled Crystal Oscillator rickman <gnuarm@gmail.com> - 2015-09-15 15:24 -0400
          Re: Software Controlled Crystal Oscillator Tim Wescott <seemywebsite@myfooter.really> - 2015-09-15 15:50 -0500
            Re: Software Controlled Crystal Oscillator rickman <gnuarm@gmail.com> - 2015-09-16 00:55 -0400
              Re: Software Controlled Crystal Oscillator Tim Wescott <seemywebsite@myfooter.really> - 2015-09-16 14:05 -0500
                Re: Software Controlled Crystal Oscillator rickman <gnuarm@gmail.com> - 2015-09-16 15:21 -0400
              Re: Software Controlled Crystal Oscillator Tim Wescott <seemywebsite@myfooter.really> - 2015-09-16 14:08 -0500
                Re: Software Controlled Crystal Oscillator rickman <gnuarm@gmail.com> - 2015-09-16 15:23 -0400
        Re: Software Controlled Crystal Oscillator Jim Thompson <To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com> - 2015-09-15 14:52 -0700
          Re: Software Controlled Crystal Oscillator Tim Wescott <seemywebsite@myfooter.really> - 2015-09-15 17:50 -0500
            Re: Software Controlled Crystal Oscillator Jim Thompson <To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com> - 2015-09-15 16:12 -0700
              Re: Software Controlled Crystal Oscillator Tim Wescott <seemywebsite@myfooter.really> - 2015-09-15 22:45 -0500
                Re: Software Controlled Crystal Oscillator Jim Thompson <To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com> - 2015-09-15 22:06 -0700
              Re: Software Controlled Crystal Oscillator Robert Baer <robertbaer@localnet.com> - 2015-09-15 22:24 -0700
                Re: Software Controlled Crystal Oscillator Martin Brown <|||newspam|||@nezumi.demon.co.uk> - 2015-09-16 09:19 +0100
                Re: Software Controlled Crystal Oscillator Robert Baer <robertbaer@localnet.com> - 2015-09-16 19:44 -0700
                Re: Software Controlled Crystal Oscillator rickman <gnuarm@gmail.com> - 2015-09-17 00:07 -0400
                Re: Software Controlled Crystal Oscillator Martin Brown <|||newspam|||@nezumi.demon.co.uk> - 2015-09-17 09:41 +0100
        Re: Software Controlled Crystal Oscillator Robert Baer <robertbaer@localnet.com> - 2015-09-15 22:18 -0700
    Re: Software Controlled Crystal Oscillator Jeroen Belleman <jeroen@nospam.please> - 2015-09-15 10:37 +0200
      Re: Software Controlled Crystal Oscillator Tim Wescott <seemywebsite@myfooter.really> - 2015-09-15 11:59 -0500
        Re: Software Controlled Crystal Oscillator rickman <gnuarm@gmail.com> - 2015-09-15 15:04 -0400
          Re: Software Controlled Crystal Oscillator Martin Brown <|||newspam|||@nezumi.demon.co.uk> - 2015-09-15 21:05 +0100
            Re: Software Controlled Crystal Oscillator rickman <gnuarm@gmail.com> - 2015-09-16 00:39 -0400
              Re: Software Controlled Crystal Oscillator Martin Brown <|||newspam|||@nezumi.demon.co.uk> - 2015-09-16 08:47 +0100
                Re: Software Controlled Crystal Oscillator rickman <gnuarm@gmail.com> - 2015-09-16 11:24 -0400
          Re: Software Controlled Crystal Oscillator whit3rd <whit3rd@gmail.com> - 2015-09-15 15:27 -0700
            Re: Software Controlled Crystal Oscillator rickman <gnuarm@gmail.com> - 2015-09-16 00:43 -0400
  Re: Software Controlled Crystal Oscillator Martin Brown <|||newspam|||@nezumi.demon.co.uk> - 2015-09-15 12:48 +0100
    Re: Software Controlled Crystal Oscillator John Larkin <jjlarkin@highlandtechnology.com> - 2015-09-15 13:01 -0700
      Re: Software Controlled Crystal Oscillator rickman <gnuarm@gmail.com> - 2015-09-16 00:48 -0400
        Re: Software Controlled Crystal Oscillator whit3rd <whit3rd@gmail.com> - 2015-09-16 11:41 -0700
          Re: Software Controlled Crystal Oscillator rickman <gnuarm@gmail.com> - 2015-09-16 15:07 -0400
  Re: Software Controlled Crystal Oscillator Robert Baer <robertbaer@localnet.com> - 2015-09-15 22:10 -0700
    Re: Software Controlled Crystal Oscillator rickman <gnuarm@gmail.com> - 2015-09-16 11:28 -0400
      Re: Software Controlled Crystal Oscillator Robert Baer <robertbaer@localnet.com> - 2015-09-16 19:52 -0700
        Re: Software Controlled Crystal Oscillator rickman <gnuarm@gmail.com> - 2015-09-17 01:00 -0400
          Re: Software Controlled Crystal Oscillator Robert Baer <robertbaer@localnet.com> - 2015-09-17 22:38 -0700

csiph-web