Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > sci.electronics.design > #376964 > unrolled thread
| Started by | rickman <gnuarm@gmail.com> |
|---|---|
| First post | 2015-09-14 23:43 -0400 |
| Last post | 2015-09-17 22:38 -0700 |
| Articles | 20 on this page of 41 — 9 participants |
Back to article view | Back to sci.electronics.design
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
Page 2 of 3 — ← Prev page 1 [2] 3 Next page →
| From | Martin Brown <|||newspam|||@nezumi.demon.co.uk> |
|---|---|
| Date | 2015-09-17 09:41 +0100 |
| Message-ID | <mtducl$p9$1@speranza.aioe.org> |
| In reply to | #377266 |
On 17/09/2015 05:07, rickman wrote: > On 9/16/2015 10:44 PM, Robert Baer wrote: >> Martin Brown wrote: >>> On 16/09/2015 06:24, Robert Baer wrote: >>>> Jim Thompson wrote: >>>>> On Tue, 15 Sep 2015 17:50:23 -0500, Tim Wescott >>>>> <seemywebsite@myfooter.really> wrote: >>>>> >>>>>> On Tue, 15 Sep 2015 14:52:18 -0700, Jim Thompson wrote: >>>>>> >>>>>>> On Tue, 15 Sep 2015 11:57:09 -0500, Tim Wescott >>>>>>> <seemywebsite@myfooter.really> wrote: >>> >>>>>>>> This is probably all borrowing trouble -- your best bet is to >>>>>>>> probably >>>>>>>> not worry about overtone operation for now, and just make the >>>>>>>> damned >>>>>>>> thing work. >>>>>>> >>>>>>> How Rube is your Goldberg ?>:-} >>>>>>> >>>>>>> ...Jim Thompson >>>>>> >>>>>> Complexity is _fun_! >>>>> >>>>> But sometimes it's just plain insane ;-) >>>>> >>>>> The phase snap of a crystal is so swift that I doubt that a >>>>> sense-it/drive-it scheme can ever work reliably... think delays. >>> >>> You don't have to hit the immediate next top dead centre with a pulse >>> but you do have to hit it reliably spot on to reinforce the oscillation. >>> John was right - starting it up is the tricky bit. Some kind of chirp >>> approach would seem the most likely. How close to the crystal >>> fundamental resonance does a signal need to be to excite one? >>> >>> Will a hard driven crystal entrain at say 1000ppm away from resonance or >>> do you have to get pretty close to spot on? Also which resonance will it >>> lock on to when driven in this sort of fashion? >>> >>>>> An unbuffered inverter makes a perfectly fine crystal oscillator... >>>>> because it's ONLY ONE-STAGE of gain. >>>>> >>>>> ...Jim Thompson >>> >>>> So...figure in the delays; maybe need to add an extra NOP or so to >>>> refine impulse timing.. >>> >>> No. We are talking fractional Nops here or more likely two paths of a >>> conditional branch that differ by one cycle every N times round a loop. >>> It will all have to be self tuning software timing loops (possibly with >>> the ability to correct for thermal drift too). Tricky problem... >>> >> One does not need to impulse drive EVERY time the xtal goes thru >> zero; every 3rd time, or 17th time would work....in fact changing that N >> to a lower value would be the equivalent of decreased drive. > > Depends on if you are talking about the start up period or the > maintenance period. During startup I would assume the fasted start up > would be with a nearly continuous drive even if it is dithered a bit. No? Actually I have been wondering about the best drive waveform to match the crystal instead of the more obvious square wave. Again it depends what you want to do. Two obvious strategies exist: Closest approximation to pure fundamental at f0 which is approx --------01111110 or assymetric ----1110 This has the effect of suppressing the third harmonic and gives a better coupling to the fundamental mode. It also neatly avoids charging the capacitive load of the xtal up to Vcc. Closest approximation to first three harmonics f0, 2f0, 3f0 which is approx ---101 Where - = tristate The latter means you are in effect searching three frequencies at once albeit with somewhat reduced efficiency. > > In maintenance the drive rate can be reduced possibly, depending on the > drive vs. the dissipation. I'm not sure of the advantage of fewer > pulses of longer duration. I would think the crystal would be more > stable with drive on every cycle rather than letting it wind down some > before popping it again. But there is a lot going on and I don't think > it has been analyzed well enough to say for sure. Once the thing is ringing properly you want to kick it as infrequently as possible to sustain the oscillation (same as you would do with a regulator pendulum clock). The crystal is a way better frequency reference than the crude exciter pulse. You might find it useful to read up on regulator clocks since they are the direct electromechanical analogues of what you are trying to do here. The hit & miss synchroniser being one such mechanism that might work for you if you can replicate the functionality in code. https://en.wikipedia.org/wiki/Shortt-Synchronome_clock NB this thing in its day was as good as a modern ovened crystal clock good to about 200us/day drift. Actually one other thought given that your zero crossing detector is sat at about 0.9v is to make the crystal not referenced to 0V but on top of a forward biassed diode voltage drop or two. Then the crystal doesn't have to be driven quite so hard for the chip to see it is oscillating. As someone else has pointed out an LC tank will hold more energy and might be easier to make fly. -- Regards, Martin Brown
[toc] | [prev] | [next] | [standalone]
| From | Robert Baer <robertbaer@localnet.com> |
|---|---|
| Date | 2015-09-15 22:18 -0700 |
| Message-ID | <2Z6Kx.37670$w27.8385@fx01.iad> |
| In reply to | #377043 |
Tim Wescott wrote: > On Tue, 15 Sep 2015 04:31:25 -0400, rickman wrote: > >> On 9/15/2015 3:37 AM, Tim Wescott wrote: >>> On Mon, 14 Sep 2015 23:43:38 -0400, rickman wrote: >>> >>>> An interesting chip design using async processors controls a single >>>> I/O pin with the conventional high/low and drive/hi-z bits. A crystal >>>> is connected to this pin and the goal is to make it oscillate. >>>> >>>> To start the crystal is driven with a square wave of approximately the >>>> right frequency as controlled by a timing loop of the async processor. >>>> This drive loop runs for a given number of cycles and exited. The I/O >>>> pin is monitored for a period of time watching for a transition from >>>> low to high. This indicates the crystal has absorbed enough energy to >>>> ring. >>>> If there is no transition for some period of time the timing loop >>>> is >>>> incremented and the process repeated. In this manner the >>>> initialization drive is scanned across the range of software timer >>>> values expected given the variations in PVT (process, voltage and >>>> temperature) which impact the timing loop in the async processor. >>>> >>>> Once a drive frequency makes the crystal ring, it is continued by >>>> driving the output high for a minimum amount of time each time the >>>> input transitions from a low to a high. This way the crystal controls >>>> the rate of the circuit and the drive from the processor simply >>>> responds. >>>> >>>> Someone has gotten this to work in the lab for a wide range of crystal >>>> frequencies up to 16 MHz. I can't see a good way to analyze this >>>> circuit the way is typically done for a typical oscillator using an >>>> analog amp and a few passives to drive the crystal. I'd like to >>>> figure out a way to analyze this digital circuit to know how close it >>>> is to the edge of not working rather than having to test the crap out >>>> of it with a range of parts, etc. >>>> >>>> Any thoughts about whether it is important to isolate the crystal from >>>> a DC bias with a capacitor? During the initial drive the crystal will >>>> see a DC bias of about half Vcc. The rest of the time the DC >>>> component of the drive will be much lower. But then the model of a >>>> crystal has no parallel resistor or inductor to pass a DC current, so >>>> one might be needed. Would a DC bias on the crystal of no more than a >>>> volt impact it's life or operation? >>> >>> I can't speak to startup, but for steady-state operation I would start >>> trying to analyze the thing by finding the current out of the pin when >>> it is driven by a sine wave at a specific frequency. >> >> I'm not sure I understand. Are you saying the crystal should be replace >> by a signal source and the current out of the pin measured? So I guess >> this should be measured with the software running in continuous mode (as >> contrasted to startup mode)? The current should be virtually zero other >> than the spike when the I/O pin is driven for a couple of ns. Maybe I >> can simulate this in spice. > > I would do this by analysis, on paper, but yes. In the frequency domain > your "virtually zero other than the spike" is "very small at all integer > multiples of f0", and if you know the characteristics of the pin under > drive you should be able to turn that "very small" into a number > dimensioned in amperes. > > You should be able to do this just fine in SPICE, with intuition and lots > of simulations. > > If you do NOT know the characteristics of the pin under drive, or if it's > got a really low impedance, or if the characteristics change over > temperature and manufacturing variation then it may be advantageous to > use a series resistor between the pin and crystal. Doing so would give > you a more consistent circuit at the cost of that one bitty resistor and > widening your pulse somewhat. > >>> The fundamental of the current should be out of the processor >>> (indicating that it's got a negative impedance) and in phase with the >>> driving voltage. If it is, and if you can easily tweak the amount of >>> current out of the pin, then you're probably made in the shade. >> >> I'm not sure what you mean by "tweak the current out of the pin". Are >> you suggesting that needs to be done in real time? Or do you just mean >> the current has to be adjusted to suit the crystal? I can see where the >> drive needs to be controlled to prevent overdriving the crystal. That >> should be doable by controlling the impulse width. > > I was thinking of tweaking the pulse width, yes. (Or that resistor that > I suggested). > >>> I'm pretty sure that this circuit is going to show poor amplitude >>> regulation, or the amplitude will be limited by the ESD protection >>> diodes going low impedance (which will be bad for the oscillator >>> stability and phase noise). Sensing amplitude would be a Good Thing if >>> you could figure out how. >> >> Not only do I think there is no way to sense amplitude (without using >> one of the ADC at least) but the threshold voltage will vary with >> temperature. > > If the average voltage on the crystal is not centered at VSS/2 then you > may be able to deduce the amplitude by measuring the times of the both > the rising and falling edge of the signal as sensed by the pin. Or, > maybe not -- that's left as an exercise to the reader. > > Come to think of it, your current should be fairly heavily dependent on > the amplitude of the crystal voltage, in a way that inherently limits the > crystal amplitude. This should become obvious if you do the analysis, or > if you play with it enough with SPICE. > >>> I think you're safe with a couple of volts of bias on a crystal, but >>> I'm just guessing. Put a high-Z resistor in parallel with the crystal >>> and ground it with a cap and you'll at least make sure that any bias is >>> short- >>> lived. >>> >>> In your analysis you might want to take a look at the crystal overtones >>> -- operating 3x higher than you want to might be an embarrassment. >> >> Yeah, I see lots of potential problems with this design. It may be >> workable in the end, but analog oscillators have been studied so much >> and this is starting from scratch. > > Oh, but life on the bleeding edge is much more fun. I assume you're > running a processor (this is the x-something-or-other, isn't it?) that > has an internal RC oscillator -- unless that oscillator were truly > horrible you could program in a nominal frequency, and avoid overtones > simply by not going there. > >> It has also occurred to me that it might be better to drive the crystal >> with a square wave through a resistor. But the phase could not be >> adjusted easily. The only trigger point for the square wave is where >> the crystal voltage crosses the input threshold. This would require two >> pins, one for the sense and one for the drive. But the driving signal >> would have a larger fundamental content and a lot less harmonic content. >> >> Most applications won't really care so much about stability... other >> than perhaps audio work. Higher end audio might be more sensitive. > > If you made my suggested resistor large enough then you could make a > pulse that's fairly wide (thus not having much 3rd harmonic content), but > you could still go high impedance around the expected VSS/2 crossing > times of the crystal to measure phase, thus doing everything with one pin. > > This just in! If you drive the crystal with six narrow pulses per cycle, > evenly spaced and of the same width, in a high,high,high,low,low,low > pattern, you'll kill the 3rd harmonic content. Further, there ought to > be a magic combination of pulse widths that'll kill both the 3rd and 5th > harmonic while still generating 1st harmonic energy. I'll guarantee the > former, but figuring out the exact pattern to play for the latter is too > involved for me to do for free right now. > > This is probably all borrowing trouble -- your best bet is to probably > not worry about overtone operation for now, and just make the damned > thing work. > Doesn't Don have a "magic sine" generator that uses pulses of some sort? Been ages sine i saw that zip by..
[toc] | [prev] | [next] | [standalone]
| From | Jeroen Belleman <jeroen@nospam.please> |
|---|---|
| Date | 2015-09-15 10:37 +0200 |
| Message-ID | <mt8lbm$94h$1@speranza.aioe.org> |
| In reply to | #376976 |
On 2015-09-15 09:37, Tim Wescott wrote: > On Mon, 14 Sep 2015 23:43:38 -0400, rickman wrote: > >> An interesting chip design using async processors controls a single I/O >> pin with the conventional high/low and drive/hi-z bits. A crystal is >> connected to this pin and the goal is to make it oscillate. >> >> To start the crystal is driven with a square wave of approximately the >> right frequency as controlled by a timing loop of the async processor. >> [...] >> >> Once a drive frequency makes the crystal ring, it is continued by >> driving the output high for a minimum amount of time each time the input >> transitions from a low to a high. This way the crystal controls the >> rate of the circuit and the drive from the processor simply responds. >> >> [...] >> >> Any thoughts about whether it is important to isolate the crystal from a >> DC bias with a capacitor?[...] > > I can't speak to startup, but for steady-state operation I would start > trying to analyze the thing by finding the current out of the pin when it > is driven by a sine wave at a specific frequency. > > The fundamental of the current should be out of the processor (indicating > that it's got a negative impedance) and in phase with the driving > voltage. If it is, and if you can easily tweak the amount of current out > of the pin, then you're probably made in the shade. > > [...] > > I think you're safe with a couple of volts of bias on a crystal, but I'm > just guessing. Put a high-Z resistor in parallel with the crystal and > ground it with a cap and you'll at least make sure that any bias is short- > lived. > > In your analysis you might want to take a look at the crystal overtones > -- operating 3x higher than you want to might be an embarrassment. > A little DC across the crystal won't harm. But what's the point of all this? Aren't the usual crystal oscillators much simpler? If the purpose is to use just one pin instead of the usual two, there exist many oscillator topologies which have one side of the crystal grounded. No idea why those are never used in digital integrated circuits. Tradition? Jeroen Belleman
[toc] | [prev] | [next] | [standalone]
| From | Tim Wescott <seemywebsite@myfooter.really> |
|---|---|
| Date | 2015-09-15 11:59 -0500 |
| Message-ID | <GuudnbjIJpn202XInZ2dnUVZ5sQAAAAA@giganews.com> |
| In reply to | #376987 |
On Tue, 15 Sep 2015 10:37:12 +0200, Jeroen Belleman wrote: > On 2015-09-15 09:37, Tim Wescott wrote: >> On Mon, 14 Sep 2015 23:43:38 -0400, rickman wrote: >> >>> An interesting chip design using async processors controls a single >>> I/O pin with the conventional high/low and drive/hi-z bits. A crystal >>> is connected to this pin and the goal is to make it oscillate. >>> >>> To start the crystal is driven with a square wave of approximately the >>> right frequency as controlled by a timing loop of the async processor. >>> [...] >>> >>> Once a drive frequency makes the crystal ring, it is continued by >>> driving the output high for a minimum amount of time each time the >>> input transitions from a low to a high. This way the crystal controls >>> the rate of the circuit and the drive from the processor simply >>> responds. >>> >>> [...] >>> >>> Any thoughts about whether it is important to isolate the crystal from >>> a DC bias with a capacitor?[...] >> >> I can't speak to startup, but for steady-state operation I would start >> trying to analyze the thing by finding the current out of the pin when >> it is driven by a sine wave at a specific frequency. >> >> The fundamental of the current should be out of the processor >> (indicating that it's got a negative impedance) and in phase with the >> driving voltage. If it is, and if you can easily tweak the amount of >> current out of the pin, then you're probably made in the shade. >> >> [...] >> >> I think you're safe with a couple of volts of bias on a crystal, but >> I'm just guessing. Put a high-Z resistor in parallel with the crystal >> and ground it with a cap and you'll at least make sure that any bias is >> short- >> lived. >> >> In your analysis you might want to take a look at the crystal overtones >> -- operating 3x higher than you want to might be an embarrassment. >> >> > A little DC across the crystal won't harm. But what's the point of all > this? Aren't the usual crystal oscillators much simpler? If the purpose > is to use just one pin instead of the usual two, there exist many > oscillator topologies which have one side of the crystal grounded. No > idea why those are never used in digital integrated circuits. Tradition? AFAIK Rick is using some newfangled processor that's basically a whole bunch of really fast, really teeny cores in a systolic array. So -- if I'm not mistaken -- he's planning on devoting one core and one pin to the task of being a crystal oscillator, which will be used as a time base for other operations on the processor. Rick can correct whatever I said that's wrong in the above paragraph. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com
[toc] | [prev] | [next] | [standalone]
| From | rickman <gnuarm@gmail.com> |
|---|---|
| Date | 2015-09-15 15:04 -0400 |
| Message-ID | <mt9pvo$71g$1@dont-email.me> |
| In reply to | #377044 |
On 9/15/2015 12:59 PM, Tim Wescott wrote: > On Tue, 15 Sep 2015 10:37:12 +0200, Jeroen Belleman wrote: > >> On 2015-09-15 09:37, Tim Wescott wrote: >>> On Mon, 14 Sep 2015 23:43:38 -0400, rickman wrote: >>> >>>> An interesting chip design using async processors controls a single >>>> I/O pin with the conventional high/low and drive/hi-z bits. A crystal >>>> is connected to this pin and the goal is to make it oscillate. >>>> >>>> To start the crystal is driven with a square wave of approximately the >>>> right frequency as controlled by a timing loop of the async processor. >>>> [...] >>>> >>>> Once a drive frequency makes the crystal ring, it is continued by >>>> driving the output high for a minimum amount of time each time the >>>> input transitions from a low to a high. This way the crystal controls >>>> the rate of the circuit and the drive from the processor simply >>>> responds. >>>> >>>> [...] >>>> >>>> Any thoughts about whether it is important to isolate the crystal from >>>> a DC bias with a capacitor?[...] >>> >>> I can't speak to startup, but for steady-state operation I would start >>> trying to analyze the thing by finding the current out of the pin when >>> it is driven by a sine wave at a specific frequency. >>> >>> The fundamental of the current should be out of the processor >>> (indicating that it's got a negative impedance) and in phase with the >>> driving voltage. If it is, and if you can easily tweak the amount of >>> current out of the pin, then you're probably made in the shade. >>> >>> [...] >>> >>> I think you're safe with a couple of volts of bias on a crystal, but >>> I'm just guessing. Put a high-Z resistor in parallel with the crystal >>> and ground it with a cap and you'll at least make sure that any bias is >>> short- >>> lived. >>> >>> In your analysis you might want to take a look at the crystal overtones >>> -- operating 3x higher than you want to might be an embarrassment. >>> >>> >> A little DC across the crystal won't harm. But what's the point of all >> this? Aren't the usual crystal oscillators much simpler? If the purpose >> is to use just one pin instead of the usual two, there exist many >> oscillator topologies which have one side of the crystal grounded. No >> idea why those are never used in digital integrated circuits. Tradition? > > AFAIK Rick is using some newfangled processor that's basically a whole > bunch of really fast, really teeny cores in a systolic array. So -- if > I'm not mistaken -- he's planning on devoting one core and one pin to the > task of being a crystal oscillator, which will be used as a time base for > other operations on the processor. > > Rick can correct whatever I said that's wrong in the above paragraph. That's pretty much right. The GA144 was introduced some three or four years ago and has received no traction that anyone can tell. One of the many features they omitted was any sort of an oscillator.. who needs an oscillator for async processors? Well you don't, but you need a timing reference for many, many applications, like anything sampling with an ADC or recreating a signal with a DAC. 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. If a chip were being designed, then yeah, just add an oscillator amplifier. But the chip is done, work with what is available. -- Rick
[toc] | [prev] | [next] | [standalone]
| From | Martin Brown <|||newspam|||@nezumi.demon.co.uk> |
|---|---|
| Date | 2015-09-15 21:05 +0100 |
| Message-ID | <mt9tll$e66$1@speranza.aioe.org> |
| In reply to | #377052 |
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
[toc] | [prev] | [next] | [standalone]
| From | rickman <gnuarm@gmail.com> |
|---|---|
| Date | 2015-09-16 00:39 -0400 |
| Message-ID | <mtarm3$isi$1@dont-email.me> |
| In reply to | #377055 |
On 9/15/2015 4:05 PM, Martin Brown wrote: > 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. It's not that bad. What the experimenter calls the "Bresenham algorithm" is essentially an NCO where you use the top bit to indicate when to fire the pulse. You can set any step size you want and the average rate will match the rate your program to a high accuracy, even with 1 loop cycle jitter (which is about 1.5 ns in this case). >> 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. Yes, I gave up on this some time back, or more accurately, when the chip maker didn't pursue it I didn't bother to pick it up. The point is that the GA144 has *many* shortcomings that even a $1 MCU deals with adequately. This is just another one that might be mitigated. -- Rick
[toc] | [prev] | [next] | [standalone]
| From | Martin Brown <|||newspam|||@nezumi.demon.co.uk> |
|---|---|
| Date | 2015-09-16 08:47 +0100 |
| Message-ID | <mtb6q4$s8h$1@speranza.aioe.org> |
| In reply to | #377092 |
On 16/09/2015 05:39, rickman wrote: > On 9/15/2015 4:05 PM, Martin Brown wrote: >> 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. > > It's not that bad. What the experimenter calls the "Bresenham > algorithm" is essentially an NCO where you use the top bit to indicate > when to fire the pulse. You can set any step size you want and the > average rate will match the rate your program to a high accuracy, even > with 1 loop cycle jitter (which is about 1.5 ns in this case). There is usually an inc by one instruction and a conditional jump on bit test. It may give you finer granularity in a tighter loop. I have used this trick to get accurate audio frequencies (with terrible phase jitter) out of relatively slowly clocked devices. I guess it depends what tests are easy on the CPU if you only have sign and overflow then adding a suitable constant is the way to go. -- Regards, Martin Brown
[toc] | [prev] | [next] | [standalone]
| From | rickman <gnuarm@gmail.com> |
|---|---|
| Date | 2015-09-16 11:24 -0400 |
| Message-ID | <mtc1fg$n57$1@dont-email.me> |
| In reply to | #377128 |
On 9/16/2015 3:47 AM, Martin Brown wrote: > On 16/09/2015 05:39, rickman wrote: >> On 9/15/2015 4:05 PM, Martin Brown wrote: > >>> 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. >> >> It's not that bad. What the experimenter calls the "Bresenham >> algorithm" is essentially an NCO where you use the top bit to indicate >> when to fire the pulse. You can set any step size you want and the >> average rate will match the rate your program to a high accuracy, even >> with 1 loop cycle jitter (which is about 1.5 ns in this case). > > There is usually an inc by one instruction and a conditional jump on bit > test. It may give you finer granularity in a tighter loop. That's what the 1.5 ns instruction is, a counted loop control instruction called unext. There is no way to get finer granularity, but the dithering seems to work ok. > I have used this trick to get accurate audio frequencies (with terrible > phase jitter) out of relatively slowly clocked devices. > > I guess it depends what tests are easy on the CPU if you only have sign > and overflow then adding a suitable constant is the way to go. > -- Rick
[toc] | [prev] | [next] | [standalone]
| From | whit3rd <whit3rd@gmail.com> |
|---|---|
| Date | 2015-09-15 15:27 -0700 |
| Message-ID | <a505859d-5652-4380-87ac-2aac87d853f0@googlegroups.com> |
| In reply to | #377052 |
On Tuesday, September 15, 2015 at 12:04:18 PM UTC-7, rickman wrote: >... One of the > many features they omitted was any sort of an oscillator.. who needs an > oscillator for async processors? Well you don't, but you need a timing > reference for many, many applications In most CPUs, there are swings (including ground bounce) at each clock pulse, which quiet down before the next pulse. In an async design, there are no quiet times, and the 'next pulse' from a quartz crystal is gonna get LOTS of jitter from data signal bleedthrough. The crystal oscillator is an analog device, it NEEDS low-noise conditions to lock onto the very small signal from the rock. High Q means very small signal coupling. Small, cheap quartz clocks are available prebuilt, it's unlikely you will benefit from avoiding them.
[toc] | [prev] | [next] | [standalone]
| From | rickman <gnuarm@gmail.com> |
|---|---|
| Date | 2015-09-16 00:43 -0400 |
| Message-ID | <mtarup$jg0$1@dont-email.me> |
| In reply to | #377064 |
On 9/15/2015 6:27 PM, whit3rd wrote: > On Tuesday, September 15, 2015 at 12:04:18 PM UTC-7, rickman wrote: >> ... One of the >> many features they omitted was any sort of an oscillator.. who needs an >> oscillator for async processors? Well you don't, but you need a timing >> reference for many, many applications > > In most CPUs, there are swings (including ground bounce) at each clock pulse, > which quiet down before the next pulse. In an async design, there are no > quiet times, and the 'next pulse' from a quartz crystal is gonna get > LOTS of jitter from data signal bleedthrough. The crystal oscillator > is an analog device, it NEEDS low-noise conditions to lock onto the > very small signal from the rock. High Q means very small signal coupling. You might be missing a critical aspect of this design. It uses the signal from the crystal to trigger the impulse to drive it, not entirely unlike the escapement on a pendulum clock giving a small push to the pendulum each time. There is no sine wave stimulation, just a push at the right moment. > Small, cheap quartz clocks are available prebuilt, it's unlikely you > will benefit from avoiding them. Sure, if you don't mind the added cost. It may not be much, but if this chip is used in a high volume product the extra cost can be significant. -- Rick
[toc] | [prev] | [next] | [standalone]
| From | Martin Brown <|||newspam|||@nezumi.demon.co.uk> |
|---|---|
| Date | 2015-09-15 12:48 +0100 |
| Message-ID | <mt90il$4p1$1@speranza.aioe.org> |
| In reply to | #376964 |
On 15/09/2015 04:43, rickman wrote: > An interesting chip design using async processors controls a single I/O > pin with the conventional high/low and drive/hi-z bits. A crystal is > connected to this pin and the goal is to make it oscillate. > > To start the crystal is driven with a square wave of approximately the > right frequency as controlled by a timing loop of the async processor. > This drive loop runs for a given number of cycles and exited. The I/O > pin is monitored for a period of time watching for a transition from low > to high. This indicates the crystal has absorbed enough energy to ring. Interesting problem. But isn't the Q of a crystal high enough that just driving it once with a delta function of about the right width will start it off for a few cycles so that the startup could be optimised to hit it with progressively wider pulses until it finally rings with sufficient amplitude to detect and monitor the voltage level inbetween. I presume the object of the exercise is to use only one pin? I expect the phase noise will be pretty horrible. For the purpose of simulation can't you just hack a suitable AC coupled transient pulse drive voltage and monitor how the virtual Xtal behaves? You basically need to be sure that it will start up and ring reliably and at the right fundamental frequency and not on some overtone. -- Regards, Martin Brown
[toc] | [prev] | [next] | [standalone]
| From | John Larkin <jjlarkin@highlandtechnology.com> |
|---|---|
| Date | 2015-09-15 13:01 -0700 |
| Message-ID | <uqtgva10urv1gfmfrg2uivghpcf8v223rf@4ax.com> |
| In reply to | #376993 |
On Tue, 15 Sep 2015 12:48:38 +0100, Martin Brown <|||newspam|||@nezumi.demon.co.uk> wrote: >On 15/09/2015 04:43, rickman wrote: > >> An interesting chip design using async processors controls a single I/O >> pin with the conventional high/low and drive/hi-z bits. A crystal is >> connected to this pin and the goal is to make it oscillate. >> >> To start the crystal is driven with a square wave of approximately the >> right frequency as controlled by a timing loop of the async processor. >> This drive loop runs for a given number of cycles and exited. The I/O >> pin is monitored for a period of time watching for a transition from low >> to high. This indicates the crystal has absorbed enough energy to ring. > >Interesting problem. > >But isn't the Q of a crystal high enough that just driving it once with >a delta function of about the right width will start it off for a few >cycles so that the startup could be optimised to hit it with >progressively wider pulses until it finally rings with sufficient >amplitude to detect and monitor the voltage level inbetween. A high-Q resonator like a crystal would take a gigantic impulse to make it ring enough that a gate could detect it. At CMOS sorts of voltages, it would need to be poked for a while with a square wave to build up amplitude, and that will involve sweeping to find the resonant frequency. HP once made a delay generator that accepted a trigger and shocked a crystal into oscillating. I recall it took hundreds of volts, and didn't work well at that. DC on the crystal shouldn't be a problem. Lots of oscillator circuits put DC across the rock.
[toc] | [prev] | [next] | [standalone]
| From | rickman <gnuarm@gmail.com> |
|---|---|
| Date | 2015-09-16 00:48 -0400 |
| Message-ID | <mtas7i$k55$1@dont-email.me> |
| In reply to | #377054 |
On 9/15/2015 4:01 PM, John Larkin wrote: > On Tue, 15 Sep 2015 12:48:38 +0100, Martin Brown > <|||newspam|||@nezumi.demon.co.uk> wrote: > >> On 15/09/2015 04:43, rickman wrote: >> >>> An interesting chip design using async processors controls a single I/O >>> pin with the conventional high/low and drive/hi-z bits. A crystal is >>> connected to this pin and the goal is to make it oscillate. >>> >>> To start the crystal is driven with a square wave of approximately the >>> right frequency as controlled by a timing loop of the async processor. >>> This drive loop runs for a given number of cycles and exited. The I/O >>> pin is monitored for a period of time watching for a transition from low >>> to high. This indicates the crystal has absorbed enough energy to ring. >> >> Interesting problem. >> >> But isn't the Q of a crystal high enough that just driving it once with >> a delta function of about the right width will start it off for a few >> cycles so that the startup could be optimised to hit it with >> progressively wider pulses until it finally rings with sufficient >> amplitude to detect and monitor the voltage level inbetween. > > A high-Q resonator like a crystal would take a gigantic impulse to > make it ring enough that a gate could detect it. At CMOS sorts of > voltages, it would need to be poked for a while with a square wave to > build up amplitude, and that will involve sweeping to find the > resonant frequency. Maybe I didn't explain the situation clearly. Someone working on this has crystals oscillating. I'm just trying to get info to help put a fine point on it. Sweeping for the frequency is exactly what the experimenter is doing. Mostly because the instruction rate of the async processor depends on PVT. It currently is driven with a square wave during the initialization. Then the drive is turned off and the input listens to the crystal for the edge, if not found a new frequency is checked. > HP once made a delay generator that accepted a trigger and shocked a > crystal into oscillating. I recall it took hundreds of volts, and > didn't work well at that. So it's pretty amazing that someone is making it work with a 1.8 volt supply! > DC on the crystal shouldn't be a problem. Lots of oscillator circuits > put DC across the rock. Good to know, thanks. -- Rick
[toc] | [prev] | [next] | [standalone]
| From | whit3rd <whit3rd@gmail.com> |
|---|---|
| Date | 2015-09-16 11:41 -0700 |
| Message-ID | <bed4fbc9-d2d0-4dba-82fe-72111da72658@googlegroups.com> |
| In reply to | #377097 |
On Tuesday, September 15, 2015 at 9:48:40 PM UTC-7, rickman wrote: > On 9/15/2015 4:01 PM, John Larkin wrote: > > On Tue, 15 Sep 2015 12:48:38 +0100, Martin Brown > > <|||newspam|||@nezumi.demon.co.uk> wrote: > > > >> On 15/09/2015 04:43, rickman wrote: > >> > >>> An interesting chip design using async processors controls a single I/O > >>> pin with the conventional high/low and drive/hi-z bits. A crystal is > >>> connected to this pin and the goal is to make it oscillate. > > A high-Q resonator like a crystal would take a gigantic impulse to > > make it ring enough that a gate could detect it. ... > Maybe I didn't explain the situation clearly. Someone working on this > has crystals oscillating. I'm just trying to get info to help put a > fine point on it. > > Sweeping for the frequency is exactly what the experimenter is doing. > Mostly because the instruction rate of the async processor depends on > PVT. It currently is driven with a square wave during the > initialization. Then the drive is turned off and the input listens to > the crystal for the edge, if not found a new frequency is checked. I'm not sure this is really useful in terms of a timing reference; the usual scheme is to generate a square-wave logic train that is triggered by the small crystal 'echo'. That crystal contribution is a sinewave, because the higher harmonics of the (square-wave) drive signal are damped more than the fundamental, and the whole loop is gain-starved. The result is a square-wave from the logic output, and a phase-lock to the crystal contribution. It has long-time coherence from the lightly coupled rock, and sharp edges from the relatively high-power logic drive. Listening for a ring-down does NOT have long-time coherence (the crystal ringing phase gets reset on each input pulse) and doesn't have high-power logic drive to an unvarying signal (I'd expect the phase of the output to be amplitude-dependent, which means the resulting tone burst drifts in frequency). It'd work better if you used an LC tank. Harmonics are less important, and even a small LC can store lots of energy.
[toc] | [prev] | [next] | [standalone]
| From | rickman <gnuarm@gmail.com> |
|---|---|
| Date | 2015-09-16 15:07 -0400 |
| Message-ID | <mtceh9$cne$1@dont-email.me> |
| In reply to | #377197 |
On 9/16/2015 2:41 PM, whit3rd wrote: > On Tuesday, September 15, 2015 at 9:48:40 PM UTC-7, rickman wrote: >> On 9/15/2015 4:01 PM, John Larkin wrote: >>> On Tue, 15 Sep 2015 12:48:38 +0100, Martin Brown >>> <|||newspam|||@nezumi.demon.co.uk> wrote: >>> >>>> On 15/09/2015 04:43, rickman wrote: >>>> >>>>> An interesting chip design using async processors controls a single I/O >>>>> pin with the conventional high/low and drive/hi-z bits. A crystal is >>>>> connected to this pin and the goal is to make it oscillate. > >>> A high-Q resonator like a crystal would take a gigantic impulse to >>> make it ring enough that a gate could detect it. ... > >> Maybe I didn't explain the situation clearly. Someone working on this >> has crystals oscillating. I'm just trying to get info to help put a >> fine point on it. >> >> Sweeping for the frequency is exactly what the experimenter is doing. >> Mostly because the instruction rate of the async processor depends on >> PVT. It currently is driven with a square wave during the >> initialization. Then the drive is turned off and the input listens to >> the crystal for the edge, if not found a new frequency is checked. > > I'm not sure this is really useful in terms of a timing reference; the > usual scheme is to generate a square-wave logic train that is triggered > by the small crystal 'echo'. That crystal contribution is a sinewave, > because the higher harmonics of the (square-wave) drive signal > are damped more than the fundamental, and the whole loop is gain-starved. > The result is a square-wave from the logic output, and a phase-lock > to the crystal contribution. It has long-time coherence from the > lightly coupled rock, and sharp edges from the relatively high-power > logic drive. > > Listening for a ring-down does NOT have long-time coherence (the > crystal ringing phase gets reset on each input pulse) and doesn't > have high-power logic drive to an unvarying signal (I'd expect the > phase of the output to be amplitude-dependent, which means the > resulting tone burst drifts in frequency). > > It'd work better if you used an LC tank. Harmonics are less important, > and even a small LC can store lots of energy. How much of this thread have you read? Please go back and read the initial post about what the circuit is doing. I think you misunderstand the difference between initialization and continuous operation. -- Rick
[toc] | [prev] | [next] | [standalone]
| From | Robert Baer <robertbaer@localnet.com> |
|---|---|
| Date | 2015-09-15 22:10 -0700 |
| Message-ID | <yR6Kx.37669$w27.10664@fx01.iad> |
| In reply to | #376964 |
rickman wrote:
> An interesting chip design using async processors controls a single I/O
> pin with the conventional high/low and drive/hi-z bits. A crystal is
> connected to this pin and the goal is to make it oscillate.
>
> To start the crystal is driven with a square wave of approximately the
> right frequency as controlled by a timing loop of the async processor.
> This drive loop runs for a given number of cycles and exited. The I/O
> pin is monitored for a period of time watching for a transition from low
> to high. This indicates the crystal has absorbed enough energy to ring.
> If there is no transition for some period of time the timing loop is
> incremented and the process repeated. In this manner the initialization
> drive is scanned across the range of software timer values expected
> given the variations in PVT (process, voltage and temperature) which
> impact the timing loop in the async processor.
>
> Once a drive frequency makes the crystal ring, it is continued by
> driving the output high for a minimum amount of time each time the input
> transitions from a low to a high. This way the crystal controls the rate
> of the circuit and the drive from the processor simply responds.
>
> Someone has gotten this to work in the lab for a wide range of crystal
> frequencies up to 16 MHz. I can't see a good way to analyze this circuit
> the way is typically done for a typical oscillator using an analog amp
> and a few passives to drive the crystal. I'd like to figure out a way to
> analyze this digital circuit to know how close it is to the edge of not
> working rather than having to test the crap out of it with a range of
> parts, etc.
>
> Any thoughts about whether it is important to isolate the crystal from a
> DC bias with a capacitor? During the initial drive the crystal will see
> a DC bias of about half Vcc. The rest of the time the DC component of
> the drive will be much lower. But then the model of a crystal has no
> parallel resistor or inductor to pass a DC current, so one might be
> needed. Would a DC bias on the crystal of no more than a volt impact
> it's life or operation?
>
I would think that ONE step, pin as output driven 0 to 1 and back for
the minimum possible time would make the xtal ring.
As fast as possible after this impulse function is complete, switch
the pin to input mode and measure times when zero-crossing is seen.
If the pin is directly connected to the xtal, "DC bias" is not the
correct term.
What matters is that the FULL 5V (or output swing of the micro) is
seen, which is NOT good even for crystals, and almost guarantees
permanent damage to a tuning fork type.
So, take that pin and use a 10:1 divider for 500mV drive Justin Case
a tuning fork type is being tested (cannot say if that is too much, it
might be).
pin
*----/\/\/-----+---+
| |
/ | xtal
\ ===
/ |
| |
*--------------+---+
GND
As you say, the SW monitor would be used to determine when the next
impulse would be needed.
[toc] | [prev] | [next] | [standalone]
| From | rickman <gnuarm@gmail.com> |
|---|---|
| Date | 2015-09-16 11:28 -0400 |
| Message-ID | <mtc1nh$o0v$1@dont-email.me> |
| In reply to | #377108 |
On 9/16/2015 1:10 AM, Robert Baer wrote: > rickman wrote: >> An interesting chip design using async processors controls a single I/O >> pin with the conventional high/low and drive/hi-z bits. A crystal is >> connected to this pin and the goal is to make it oscillate. >> >> To start the crystal is driven with a square wave of approximately the >> right frequency as controlled by a timing loop of the async processor. >> This drive loop runs for a given number of cycles and exited. The I/O >> pin is monitored for a period of time watching for a transition from low >> to high. This indicates the crystal has absorbed enough energy to ring. >> If there is no transition for some period of time the timing loop is >> incremented and the process repeated. In this manner the initialization >> drive is scanned across the range of software timer values expected >> given the variations in PVT (process, voltage and temperature) which >> impact the timing loop in the async processor. >> >> Once a drive frequency makes the crystal ring, it is continued by >> driving the output high for a minimum amount of time each time the input >> transitions from a low to a high. This way the crystal controls the rate >> of the circuit and the drive from the processor simply responds. >> >> Someone has gotten this to work in the lab for a wide range of crystal >> frequencies up to 16 MHz. I can't see a good way to analyze this circuit >> the way is typically done for a typical oscillator using an analog amp >> and a few passives to drive the crystal. I'd like to figure out a way to >> analyze this digital circuit to know how close it is to the edge of not >> working rather than having to test the crap out of it with a range of >> parts, etc. >> >> Any thoughts about whether it is important to isolate the crystal from a >> DC bias with a capacitor? During the initial drive the crystal will see >> a DC bias of about half Vcc. The rest of the time the DC component of >> the drive will be much lower. But then the model of a crystal has no >> parallel resistor or inductor to pass a DC current, so one might be >> needed. Would a DC bias on the crystal of no more than a volt impact >> it's life or operation? >> > I would think that ONE step, pin as output driven 0 to 1 and back for > the minimum possible time would make the xtal ring. > As fast as possible after this impulse function is complete, switch > the pin to input mode and measure times when zero-crossing is seen. There's the rub. There is *no* zero crossing detect. This is a digital input pin and the threshold is at some value near Vcc/2 or 0.9 V. > If the pin is directly connected to the xtal, "DC bias" is not the > correct term. > What matters is that the FULL 5V (or output swing of the micro) is > seen, which is NOT good even for crystals, and almost guarantees > permanent damage to a tuning fork type. Is 1.8 V too much? > So, take that pin and use a 10:1 divider for 500mV drive Justin Case > a tuning fork type is being tested (cannot say if that is too much, it > might be). > > pin > *----/\/\/-----+---+ > | | > / | xtal > \ === > / | > | | > *--------------+---+ > GND > > As you say, the SW monitor would be used to determine when the next > impulse would be needed. -- Rick
[toc] | [prev] | [next] | [standalone]
| From | Robert Baer <robertbaer@localnet.com> |
|---|---|
| Date | 2015-09-16 19:52 -0700 |
| Message-ID | <WVpKx.17016$Sx2.15174@fx31.iad> |
| In reply to | #377170 |
rickman wrote:
> On 9/16/2015 1:10 AM, Robert Baer wrote:
>> rickman wrote:
>>> An interesting chip design using async processors controls a single I/O
>>> pin with the conventional high/low and drive/hi-z bits. A crystal is
>>> connected to this pin and the goal is to make it oscillate.
>>>
>>> To start the crystal is driven with a square wave of approximately the
>>> right frequency as controlled by a timing loop of the async processor.
>>> This drive loop runs for a given number of cycles and exited. The I/O
>>> pin is monitored for a period of time watching for a transition from low
>>> to high. This indicates the crystal has absorbed enough energy to ring.
>>> If there is no transition for some period of time the timing loop is
>>> incremented and the process repeated. In this manner the initialization
>>> drive is scanned across the range of software timer values expected
>>> given the variations in PVT (process, voltage and temperature) which
>>> impact the timing loop in the async processor.
>>>
>>> Once a drive frequency makes the crystal ring, it is continued by
>>> driving the output high for a minimum amount of time each time the input
>>> transitions from a low to a high. This way the crystal controls the rate
>>> of the circuit and the drive from the processor simply responds.
>>>
>>> Someone has gotten this to work in the lab for a wide range of crystal
>>> frequencies up to 16 MHz. I can't see a good way to analyze this circuit
>>> the way is typically done for a typical oscillator using an analog amp
>>> and a few passives to drive the crystal. I'd like to figure out a way to
>>> analyze this digital circuit to know how close it is to the edge of not
>>> working rather than having to test the crap out of it with a range of
>>> parts, etc.
>>>
>>> Any thoughts about whether it is important to isolate the crystal from a
>>> DC bias with a capacitor? During the initial drive the crystal will see
>>> a DC bias of about half Vcc. The rest of the time the DC component of
>>> the drive will be much lower. But then the model of a crystal has no
>>> parallel resistor or inductor to pass a DC current, so one might be
>>> needed. Would a DC bias on the crystal of no more than a volt impact
>>> it's life or operation?
>>>
>> I would think that ONE step, pin as output driven 0 to 1 and back for
>> the minimum possible time would make the xtal ring.
>> As fast as possible after this impulse function is complete, switch
>> the pin to input mode and measure times when zero-crossing is seen.
>
> There's the rub. There is *no* zero crossing detect. This is a digital
> input pin and the threshold is at some value near Vcc/2 or 0.9 V.
* As Einstein used to say, it is all relative (aunts, uncles, etc). In
this case, i would define "zero crossing" as being the point where the
slope of the (presumed) sine is maximum positive/negative.
>
>
>> If the pin is directly connected to the xtal, "DC bias" is not the
>> correct term.
>> What matters is that the FULL 5V (or output swing of the micro) is
>> seen, which is NOT good even for crystals, and almost guarantees
>> permanent damage to a tuning fork type.
>
> Is 1.8 V too much?
* For a tuning fork, 500mV may be too much.
** COPY OF POST AGES AGO:
Plug crystal into appropriate socket; each has its specified load.
The drive resistor shown is the maximum value that allows all
frequencies of a given type to oscillate; some frequencies work with
higher R values (less drive).
NOTE: in *all* cases the frequency is higher than marked (expected)
value.
Made using a 74AC02 which oscillates near 140Mhz with no Xtal plugged
in (amplitude about 1V pk-pk at 5V supply).
Xlo (Khz)
10M Marking | Measured
+-----/\/\----+ --------+-----------
| | 32 | 32.7711
| |\ | | 32.7710
+-----| >o----+---+ | 32.7721
| |/ | | --------+-----------
| \ | 100 | 100.0033
| 680K / | | 100.0042
| \ | --------+-----------
| Xlo | | 200 | 200.0951
+-----o o----+ \ --------+-----------
| | / 6.8K 1000 | 1000.386
--- 10p --- \
--- 22p --- | Xhi (Mhz)
| | | Marking | Measured
| V | ----------+-----------
| Xhi | 2.000 | 2.000188
+-----o o----+---+ | 2.000179
| | ----------+-----------
--- --- 3.579545 | 3.580152
--- 18p --- 18p ----------+-----------
| | 10.000 | 10.003115
V GND V ----------+-----------
12.000 | 12.007229
** END COPY
NOTE 680K in series with the tuning fork type crystal; dinky drive.
>
>
>> So, take that pin and use a 10:1 divider for 500mV drive Justin Case
>> a tuning fork type is being tested (cannot say if that is too much, it
>> might be).
>>
>> pin
>> *----/\/\/-----+---+
>> | |
>> / | xtal
>> \ ===
>> / |
>> | |
>> *--------------+---+
>> GND
>>
>> As you say, the SW monitor would be used to determine when the next
>> impulse would be needed.
>
>
[toc] | [prev] | [next] | [standalone]
| From | rickman <gnuarm@gmail.com> |
|---|---|
| Date | 2015-09-17 01:00 -0400 |
| Message-ID | <mtdh94$p59$1@dont-email.me> |
| In reply to | #377256 |
On 9/16/2015 10:52 PM, Robert Baer wrote: > rickman wrote: >> On 9/16/2015 1:10 AM, Robert Baer wrote: >>> rickman wrote: >>>> An interesting chip design using async processors controls a single I/O >>>> pin with the conventional high/low and drive/hi-z bits. A crystal is >>>> connected to this pin and the goal is to make it oscillate. >>>> >>>> To start the crystal is driven with a square wave of approximately the >>>> right frequency as controlled by a timing loop of the async processor. >>>> This drive loop runs for a given number of cycles and exited. The I/O >>>> pin is monitored for a period of time watching for a transition from >>>> low >>>> to high. This indicates the crystal has absorbed enough energy to ring. >>>> If there is no transition for some period of time the timing loop is >>>> incremented and the process repeated. In this manner the initialization >>>> drive is scanned across the range of software timer values expected >>>> given the variations in PVT (process, voltage and temperature) which >>>> impact the timing loop in the async processor. >>>> >>>> Once a drive frequency makes the crystal ring, it is continued by >>>> driving the output high for a minimum amount of time each time the >>>> input >>>> transitions from a low to a high. This way the crystal controls the >>>> rate >>>> of the circuit and the drive from the processor simply responds. >>>> >>>> Someone has gotten this to work in the lab for a wide range of crystal >>>> frequencies up to 16 MHz. I can't see a good way to analyze this >>>> circuit >>>> the way is typically done for a typical oscillator using an analog amp >>>> and a few passives to drive the crystal. I'd like to figure out a >>>> way to >>>> analyze this digital circuit to know how close it is to the edge of not >>>> working rather than having to test the crap out of it with a range of >>>> parts, etc. >>>> >>>> Any thoughts about whether it is important to isolate the crystal >>>> from a >>>> DC bias with a capacitor? During the initial drive the crystal will see >>>> a DC bias of about half Vcc. The rest of the time the DC component of >>>> the drive will be much lower. But then the model of a crystal has no >>>> parallel resistor or inductor to pass a DC current, so one might be >>>> needed. Would a DC bias on the crystal of no more than a volt impact >>>> it's life or operation? >>>> >>> I would think that ONE step, pin as output driven 0 to 1 and back for >>> the minimum possible time would make the xtal ring. >>> As fast as possible after this impulse function is complete, switch >>> the pin to input mode and measure times when zero-crossing is seen. >> >> There's the rub. There is *no* zero crossing detect. This is a digital >> input pin and the threshold is at some value near Vcc/2 or 0.9 V. > * As Einstein used to say, it is all relative (aunts, uncles, etc). In > this case, i would define "zero crossing" as being the point where the > slope of the (presumed) sine is maximum positive/negative. Ok, great. Now we are on the same wavelength so to speak. The input of the pin will not have a zero crossing detect. There is no reason to believe the zero crossing will be coincident with the input threshold crossing. >>> If the pin is directly connected to the xtal, "DC bias" is not the >>> correct term. >>> What matters is that the FULL 5V (or output swing of the micro) is >>> seen, which is NOT good even for crystals, and almost guarantees >>> permanent damage to a tuning fork type. >> >> Is 1.8 V too much? > * For a tuning fork, 500mV may be too much. But you are talking about a continuous drive of a 500 mV sine wave. A drive of 1.8 V for 2 ns is not likely to hurt a crystal from over drive. > ** COPY OF POST AGES AGO: > Plug crystal into appropriate socket; each has its specified load. > The drive resistor shown is the maximum value that allows all > frequencies of a given type to oscillate; some frequencies work with > higher R values (less drive). > NOTE: in *all* cases the frequency is higher than marked (expected) > value. > Made using a 74AC02 which oscillates near 140Mhz with no Xtal plugged > in (amplitude about 1V pk-pk at 5V supply). > > Xlo (Khz) > 10M Marking | Measured > +-----/\/\----+ --------+----------- > | | 32 | 32.7711 > | |\ | | 32.7710 > +-----| >o----+---+ | 32.7721 > | |/ | | --------+----------- > | \ | 100 | 100.0033 > | 680K / | | 100.0042 > | \ | --------+----------- > | Xlo | | 200 | 200.0951 > +-----o o----+ \ --------+----------- > | | / 6.8K 1000 | 1000.386 > --- 10p --- \ > --- 22p --- | Xhi (Mhz) > | | | Marking | Measured > | V | ----------+----------- > | Xhi | 2.000 | 2.000188 > +-----o o----+---+ | 2.000179 > | | ----------+----------- > --- --- 3.579545 | 3.580152 > --- 18p --- 18p ----------+----------- > | | 10.000 | 10.003115 > V GND V ----------+----------- > 12.000 | 12.007229 > ** END COPY > NOTE 680K in series with the tuning fork type crystal; dinky drive. Great circuit, but it is continuous. Not terribly applicable to an impulse type of drive, no, yes? Also, I'm unclear on the reason for the 22 pF cap in series with the Xhi. Is that mainly to reduce the capacitance Xlo sees? What does it do to the Xhi circuit? -- Rick
[toc] | [prev] | [next] | [standalone]
Page 2 of 3 — ← Prev page 1 [2] 3 Next page →
Back to top | Article view | sci.electronics.design
csiph-web