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 1 of 3 [1] 2 3 Next page →
| From | rickman <gnuarm@gmail.com> |
|---|---|
| Date | 2015-09-14 23:43 -0400 |
| Subject | Software Controlled Crystal Oscillator |
| Message-ID | <mt841o$4m3$1@dont-email.me> |
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? -- Rick
[toc] | [next] | [standalone]
| From | Tim Wescott <tim@seemywebsite.com> |
|---|---|
| Date | 2015-09-15 02:37 -0500 |
| Message-ID | <m4mdncHCAd5MV2rInZ2dnUVZ5r-dnZ2d@giganews.com> |
| In reply to | #376964 |
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. 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 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. 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. -- www.wescottdesign.com
[toc] | [prev] | [next] | [standalone]
| From | rickman <gnuarm@gmail.com> |
|---|---|
| Date | 2015-09-15 04:31 -0400 |
| Message-ID | <mt8ktb$jk2$1@dont-email.me> |
| In reply to | #376976 |
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. > 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'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. > 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. 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. -- Rick
[toc] | [prev] | [next] | [standalone]
| From | Tim Wescott <seemywebsite@myfooter.really> |
|---|---|
| Date | 2015-09-15 11:57 -0500 |
| Message-ID | <GuudnbnIJpl40GXInZ2dnUVZ5sSdnZ2d@giganews.com> |
| In reply to | #376984 |
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. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com
[toc] | [prev] | [next] | [standalone]
| From | rickman <gnuarm@gmail.com> |
|---|---|
| Date | 2015-09-15 15:24 -0400 |
| Message-ID | <mt9r5c$bvf$1@dont-email.me> |
| In reply to | #377043 |
On 9/15/2015 12:57 PM, 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. Yeah, if I get motivated I might do that. I think I did work on this once. But spice is not so good at accurately modeling oscillators from my limited experience. I can say pretty easily that with a 10^(some fairly large value) ohms impedance in input mode and some 10's of ohms in output mode, the I/O won't be too hard to model. I'm just not sure what to make of the result. Seems to me a load capacitor is needed in parallel with the crystal to meet the maker's spec. Not sure if anyone has done this. Adding a resistor to the drive can be done easily. > 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. The phasing is a part I'm not sure of. Imagine a sine wave from the crystal and positively crossing an arbitrary threshold. At that point a positive spike is driven into the crystal. It will contain some fundamental but I don't think it will be zero phase. That would require detecting the peak of the sine wave which this circuit can't do. Spreading out the drive and using a resistor can get a better alignment of the phase, but at a cost of current in the core. When it is running the current is around 5 mA iirc. When sleeping it is approx zero (nA I believe). So sleeping is preferable. The only way the processor has to time events is to loop which is not very accurate (async proc running with variations in PVT, process, voltage and time). So timing can only be approximate unless it is sync'd to the crystal by the input. >> 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). Do you mean experimenting to find a suitable value or adjusting in real time by some measurement? >>> 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'm not seeing that unless you mean with higher oscillations the drive is reduced because of the relative value. With a short impulse that is not the case really since the impulse is sync'd to the input transition. This would require the node to delay by some timing value. >>> 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. You can call it an RC oscillator. The nodes are async and each one has it's own instruction timing which varies with the instruction. >> 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. Yeah, I thought of that. I would like to not run the processor all the time though. > 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. I don't follow what this sequence means. You mean drive it both high and low with narrow pulses? The timing of the pulses would be very inaccurate although there are ways to sync to the crystal with something like a PLL I guess. > 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. Ok, I'll come mow your lawn. > 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. He has it "working" for 1 MHz and several values up to 16 MHz, but not 2 MHz which he doesn't understand why. I think he said 18 MHz doesn't work but he blames that on the limits of even the dithering technique which I'm not so sure of. -- Rick
[toc] | [prev] | [next] | [standalone]
| From | Tim Wescott <seemywebsite@myfooter.really> |
|---|---|
| Date | 2015-09-15 15:50 -0500 |
| Message-ID | <PPadnUFgfugsGWXInZ2dnUVZ5g2dnZ2d@giganews.com> |
| In reply to | #377053 |
On Tue, 15 Sep 2015 15:24:12 -0400, rickman wrote: > On 9/15/2015 12:57 PM, 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. > > Yeah, if I get motivated I might do that. I think I did work on this > once. But spice is not so good at accurately modeling oscillators from > my limited experience. > > I can say pretty easily that with a 10^(some fairly large value) ohms > impedance in input mode and some 10's of ohms in output mode, the I/O > won't be too hard to model. I'm just not sure what to make of the > result. > > Seems to me a load capacitor is needed in parallel with the crystal to > meet the maker's spec. Not sure if anyone has done this. Adding a > resistor to the drive can be done easily. > > >> 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. > > The phasing is a part I'm not sure of. Imagine a sine wave from the > crystal and positively crossing an arbitrary threshold. At that point a > positive spike is driven into the crystal. It will contain some > fundamental but I don't think it will be zero phase. That would require > detecting the peak of the sine wave which this circuit can't do. > > Spreading out the drive and using a resistor can get a better alignment > of the phase, but at a cost of current in the core. When it is running > the current is around 5 mA iirc. When sleeping it is approx zero (nA I > believe). So sleeping is preferable. The only way the processor has to > time events is to loop which is not very accurate (async proc running > with variations in PVT, process, voltage and time). So timing can only > be approximate unless it is sync'd to the crystal by the input. > > >>> 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). > > Do you mean experimenting to find a suitable value or adjusting in real > time by some measurement? > > >>>> 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'm not seeing that unless you mean with higher oscillations the drive > is reduced because of the relative value. With a short impulse that is > not the case really since the impulse is sync'd to the input transition. > This would require the node to delay by some timing value. > > >>>> 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. > > You can call it an RC oscillator. The nodes are async and each one has > it's own instruction timing which varies with the instruction. > > >>> 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. > > Yeah, I thought of that. I would like to not run the processor all the > time though. > > >> 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. > > I don't follow what this sequence means. You mean drive it both high > and low with narrow pulses? The timing of the pulses would be very > inaccurate although there are ways to sync to the crystal with something > like a PLL I guess. > > >> 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. > > Ok, I'll come mow your lawn. > > >> 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. > > He has it "working" for 1 MHz and several values up to 16 MHz, but not 2 > MHz which he doesn't understand why. I think he said 18 MHz doesn't > work but he blames that on the limits of even the dithering technique > which I'm not so sure of. I'm not going to try to stick this in where it might "belong" because it seems that I was laboring under a fundamental misapprehension. Namely, that your processor would be running all the time, and that you'd blip the output at some fixed time _after_ a transition is noted. Because, basically, you want the current out of the pin to -- ignoring harmonics -- be in phase with the voltage going in. Blipping the pin right as the transition is made will generate a current that's nearly 90 degrees out of phase (one way or another) with the voltage. If you do your math, you'll see that if the current were _exactly_ 90 degrees out of phase with the voltage then you'd get no power transfer at all into the crystal, which means that your oscillator won't work because power transfer into the crystal is exactly what you're trying to achieve. If power consumption weren't an issue then you'd have a software loop that gets an edge, counts out about 1/4 of a cycle, blips, waits for an edge, counts, blips, etc. Things may not be that bad, though: since it's a crystal you may still be able to achieve your desired goal by making the blip 100 times wider and only blipping the crystal every 100th cycle, depending on the crystal Q to sort you out in between. So for 99 cycles it'd just be waking up, doing an increment (or decrement) and a test. You'd be using full current (is it really 5mA _per core_?) for a significant fraction of, a cycle, but it would only be 1% of the time (or less, if you waited more cycles between blips). -- Tim Wescott Wescott Design Services http://www.wescottdesign.com
[toc] | [prev] | [next] | [standalone]
| From | rickman <gnuarm@gmail.com> |
|---|---|
| Date | 2015-09-16 00:55 -0400 |
| Message-ID | <mtaskb$l3f$1@dont-email.me> |
| In reply to | #377057 |
On 9/15/2015 4:50 PM, Tim Wescott wrote: > > I'm not going to try to stick this in where it might "belong" because it > seems that I was laboring under a fundamental misapprehension. > > Namely, that your processor would be running all the time, and that you'd > blip the output at some fixed time _after_ a transition is noted. > Because, basically, you want the current out of the pin to -- ignoring > harmonics -- be in phase with the voltage going in. > > Blipping the pin right as the transition is made will generate a current > that's nearly 90 degrees out of phase (one way or another) with the > voltage. If you do your math, you'll see that if the current were > _exactly_ 90 degrees out of phase with the voltage then you'd get no > power transfer at all into the crystal, which means that your oscillator > won't work because power transfer into the crystal is exactly what you're > trying to achieve. I think your perceived phase is assumed, not necessarily real. The threshold crossing will be at some voltage and the crystal oscillations will be at some amplitude. The phase of the positive edge detect will be at a phase determined by the ratio of these two values. In fact, this may be what limits the amplitude of the oscillations. When the amplitude grows the phase of the stimulus changes to make it less effective. BTW, what will be the relative phase of the current and the voltage in a crystal at proper operating point? Don't they look capacitive? > If power consumption weren't an issue then you'd have a software loop > that gets an edge, counts out about 1/4 of a cycle, blips, waits for an > edge, counts, blips, etc. You don't need the processor to run all the time. It can be triggered by the edge detect, loop for the correct phase angle, drive the crystal, then go back to sleep with nA current draw. > Things may not be that bad, though: since it's a crystal you may still be > able to achieve your desired goal by making the blip 100 times wider and > only blipping the crystal every 100th cycle, depending on the crystal Q > to sort you out in between. So for 99 cycles it'd just be waking up, > doing an increment (or decrement) and a test. You'd be using full > current (is it really 5mA _per core_?) for a significant fraction of, a > cycle, but it would only be 1% of the time (or less, if you waited more > cycles between blips). This won't have an impact on frequency and phase stability? -- Rick
[toc] | [prev] | [next] | [standalone]
| From | Tim Wescott <seemywebsite@myfooter.really> |
|---|---|
| Date | 2015-09-16 14:05 -0500 |
| Message-ID | <cM2dnXWIFc0PIGTInZ2dnUVZ5jadnZ2d@giganews.com> |
| In reply to | #377100 |
On Wed, 16 Sep 2015 00:55:24 -0400, rickman wrote: > On 9/15/2015 4:50 PM, Tim Wescott wrote: >> >> I'm not going to try to stick this in where it might "belong" because >> it seems that I was laboring under a fundamental misapprehension. >> >> Namely, that your processor would be running all the time, and that >> you'd blip the output at some fixed time _after_ a transition is noted. >> Because, basically, you want the current out of the pin to -- ignoring >> harmonics -- be in phase with the voltage going in. >> >> Blipping the pin right as the transition is made will generate a >> current that's nearly 90 degrees out of phase (one way or another) with >> the voltage. If you do your math, you'll see that if the current were >> _exactly_ 90 degrees out of phase with the voltage then you'd get no >> power transfer at all into the crystal, which means that your >> oscillator won't work because power transfer into the crystal is >> exactly what you're trying to achieve. > > I think your perceived phase is assumed, not necessarily real. The > threshold crossing will be at some voltage and the crystal oscillations > will be at some amplitude. The phase of the positive edge detect will > be at a phase determined by the ratio of these two values. In fact, > this may be what limits the amplitude of the oscillations. When the > amplitude grows the phase of the stimulus changes to make it less > effective. It would depend on how you drive the crystal. If you drive it on the half-cycle, with a high-going and low-going pulses, then the edges will happen at roughly the +/- 90-degree marks. If you just drive it with a positive pulse the crystal voltage will drift up to VSS and there won't be any AC drive to the crystal at all. So if it's working, the edges will be around the 90 degree points -- any deviation from this will depend on the chip's threshold voltage. > BTW, what will be the relative phase of the current and the voltage in a > crystal at proper operating point? Don't they look capacitive? If you're running the oscillator in parallel mode then the crystal itself will look inductive -- but you need to pair it up with the specified load capacitance. >> If power consumption weren't an issue then you'd have a software loop >> that gets an edge, counts out about 1/4 of a cycle, blips, waits for an >> edge, counts, blips, etc. > > You don't need the processor to run all the time. It can be triggered > by the edge detect, loop for the correct phase angle, drive the crystal, > then go back to sleep with nA current draw. Yes, but the correct phase angle is 90 degrees, which is 1/4 of a cycle. >> Things may not be that bad, though: since it's a crystal you may still >> be able to achieve your desired goal by making the blip 100 times wider >> and only blipping the crystal every 100th cycle, depending on the >> crystal Q to sort you out in between. So for 99 cycles it'd just be >> waking up, doing an increment (or decrement) and a test. You'd be >> using full current (is it really 5mA _per core_?) for a significant >> fraction of, a cycle, but it would only be 1% of the time (or less, if >> you waited more cycles between blips). > > This won't have an impact on frequency and phase stability? It will increase the phase noise introduced by the processor, giving you a tradeoff between power consumption and timebase quality. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com
[toc] | [prev] | [next] | [standalone]
| From | rickman <gnuarm@gmail.com> |
|---|---|
| Date | 2015-09-16 15:21 -0400 |
| Message-ID | <mtcfd0$g8r$1@dont-email.me> |
| In reply to | #377200 |
On 9/16/2015 3:05 PM, Tim Wescott wrote: > On Wed, 16 Sep 2015 00:55:24 -0400, rickman wrote: > >> On 9/15/2015 4:50 PM, Tim Wescott wrote: >>> >>> I'm not going to try to stick this in where it might "belong" because >>> it seems that I was laboring under a fundamental misapprehension. >>> >>> Namely, that your processor would be running all the time, and that >>> you'd blip the output at some fixed time _after_ a transition is noted. >>> Because, basically, you want the current out of the pin to -- ignoring >>> harmonics -- be in phase with the voltage going in. >>> >>> Blipping the pin right as the transition is made will generate a >>> current that's nearly 90 degrees out of phase (one way or another) with >>> the voltage. If you do your math, you'll see that if the current were >>> _exactly_ 90 degrees out of phase with the voltage then you'd get no >>> power transfer at all into the crystal, which means that your >>> oscillator won't work because power transfer into the crystal is >>> exactly what you're trying to achieve. >> >> I think your perceived phase is assumed, not necessarily real. The >> threshold crossing will be at some voltage and the crystal oscillations >> will be at some amplitude. The phase of the positive edge detect will >> be at a phase determined by the ratio of these two values. In fact, >> this may be what limits the amplitude of the oscillations. When the >> amplitude grows the phase of the stimulus changes to make it less >> effective. > > It would depend on how you drive the crystal. If you drive it on the > half-cycle, with a high-going and low-going pulses, then the edges will > happen at roughly the +/- 90-degree marks. If you just drive it with a > positive pulse the crystal voltage will drift up to VSS and there won't > be any AC drive to the crystal at all. I don't get why you refer to the "half-cycle". Why would that be the threshold crossing invariant of amplitude? Someone pointed out that the amplitude dependance of the phase of the drive would lead to lots of phase noise. I think this is correct. Especially when you consider that the voltage on the crystal doesn't provide the output directly. The clock will come from the processor activated by the edge detect. Assuming this clock is only needed internally, this timing reference is passed around internally between the processors. Due to the very low latency of instruction execution there is very little phase jitter added other than perhaps the variability of instruction execution time I suppose. I guess once you enter the "soft" domain the idea of phase jitter is hard to maintain. This might be problematic for an application which is very phase jitter sensitive. > So if it's working, the edges will be around the 90 degree points -- any > deviation from this will depend on the chip's threshold voltage. By 90 degree points, I assume you mean the zero crossings of a pure cosine wave with no DC artifact? Otherwise I am not at all clear what phase angle you are referring to. >> BTW, what will be the relative phase of the current and the voltage in a >> crystal at proper operating point? Don't they look capacitive? > > If you're running the oscillator in parallel mode then the crystal itself > will look inductive -- but you need to pair it up with the specified load > capacitance. > >>> If power consumption weren't an issue then you'd have a software loop >>> that gets an edge, counts out about 1/4 of a cycle, blips, waits for an >>> edge, counts, blips, etc. >> >> You don't need the processor to run all the time. It can be triggered >> by the edge detect, loop for the correct phase angle, drive the crystal, >> then go back to sleep with nA current draw. > > Yes, but the correct phase angle is 90 degrees, which is 1/4 of a cycle. Correct meaning what? 90 degrees on a sine wave is the point of maximum amplitude. Is that what you mean? But that may or may not be 90 degrees from the threshold crossing. >>> Things may not be that bad, though: since it's a crystal you may still >>> be able to achieve your desired goal by making the blip 100 times wider >>> and only blipping the crystal every 100th cycle, depending on the >>> crystal Q to sort you out in between. So for 99 cycles it'd just be >>> waking up, doing an increment (or decrement) and a test. You'd be >>> using full current (is it really 5mA _per core_?) for a significant >>> fraction of, a cycle, but it would only be 1% of the time (or less, if >>> you waited more cycles between blips). >> >> This won't have an impact on frequency and phase stability? > > It will increase the phase noise introduced by the processor, giving you > a tradeoff between power consumption and timebase quality. > -- Rick
[toc] | [prev] | [next] | [standalone]
| From | Tim Wescott <seemywebsite@myfooter.really> |
|---|---|
| Date | 2015-09-16 14:08 -0500 |
| Message-ID | <cM2dnXSIFc2iI2TInZ2dnUVZ5jadnZ2d@giganews.com> |
| In reply to | #377100 |
On Wed, 16 Sep 2015 00:55:24 -0400, rickman wrote: > On 9/15/2015 4:50 PM, Tim Wescott wrote: >> >> I'm not going to try to stick this in where it might "belong" because >> it seems that I was laboring under a fundamental misapprehension. >> >> Namely, that your processor would be running all the time, and that >> you'd blip the output at some fixed time _after_ a transition is noted. >> Because, basically, you want the current out of the pin to -- ignoring >> harmonics -- be in phase with the voltage going in. >> >> Blipping the pin right as the transition is made will generate a >> current that's nearly 90 degrees out of phase (one way or another) with >> the voltage. If you do your math, you'll see that if the current were >> _exactly_ 90 degrees out of phase with the voltage then you'd get no >> power transfer at all into the crystal, which means that your >> oscillator won't work because power transfer into the crystal is >> exactly what you're trying to achieve. > > I think your perceived phase is assumed, not necessarily real. The > threshold crossing will be at some voltage and the crystal oscillations > will be at some amplitude. The phase of the positive edge detect will > be at a phase determined by the ratio of these two values. In fact, > this may be what limits the amplitude of the oscillations. When the > amplitude grows the phase of the stimulus changes to make it less > effective. > > BTW, what will be the relative phase of the current and the voltage in a > crystal at proper operating point? Don't they look capacitive? > > >> If power consumption weren't an issue then you'd have a software loop >> that gets an edge, counts out about 1/4 of a cycle, blips, waits for an >> edge, counts, blips, etc. > > You don't need the processor to run all the time. It can be triggered > by the edge detect, loop for the correct phase angle, drive the crystal, > then go back to sleep with nA current draw. > > >> Things may not be that bad, though: since it's a crystal you may still >> be able to achieve your desired goal by making the blip 100 times wider >> and only blipping the crystal every 100th cycle, depending on the >> crystal Q to sort you out in between. So for 99 cycles it'd just be >> waking up, doing an increment (or decrement) and a test. You'd be >> using full current (is it really 5mA _per core_?) for a significant >> fraction of, a cycle, but it would only be 1% of the time (or less, if >> you waited more cycles between blips). > > This won't have an impact on frequency and phase stability? Maybe you just need to build the damned thing and see how it works? -- Tim Wescott Wescott Design Services http://www.wescottdesign.com
[toc] | [prev] | [next] | [standalone]
| From | rickman <gnuarm@gmail.com> |
|---|---|
| Date | 2015-09-16 15:23 -0400 |
| Message-ID | <mtcffb$g8r$2@dont-email.me> |
| In reply to | #377203 |
On 9/16/2015 3:08 PM, Tim Wescott wrote: > On Wed, 16 Sep 2015 00:55:24 -0400, rickman wrote: > >> On 9/15/2015 4:50 PM, Tim Wescott wrote: >>> >>> I'm not going to try to stick this in where it might "belong" because >>> it seems that I was laboring under a fundamental misapprehension. >>> >>> Namely, that your processor would be running all the time, and that >>> you'd blip the output at some fixed time _after_ a transition is noted. >>> Because, basically, you want the current out of the pin to -- ignoring >>> harmonics -- be in phase with the voltage going in. >>> >>> Blipping the pin right as the transition is made will generate a >>> current that's nearly 90 degrees out of phase (one way or another) with >>> the voltage. If you do your math, you'll see that if the current were >>> _exactly_ 90 degrees out of phase with the voltage then you'd get no >>> power transfer at all into the crystal, which means that your >>> oscillator won't work because power transfer into the crystal is >>> exactly what you're trying to achieve. >> >> I think your perceived phase is assumed, not necessarily real. The >> threshold crossing will be at some voltage and the crystal oscillations >> will be at some amplitude. The phase of the positive edge detect will >> be at a phase determined by the ratio of these two values. In fact, >> this may be what limits the amplitude of the oscillations. When the >> amplitude grows the phase of the stimulus changes to make it less >> effective. >> >> BTW, what will be the relative phase of the current and the voltage in a >> crystal at proper operating point? Don't they look capacitive? >> >> >>> If power consumption weren't an issue then you'd have a software loop >>> that gets an edge, counts out about 1/4 of a cycle, blips, waits for an >>> edge, counts, blips, etc. >> >> You don't need the processor to run all the time. It can be triggered >> by the edge detect, loop for the correct phase angle, drive the crystal, >> then go back to sleep with nA current draw. >> >> >>> Things may not be that bad, though: since it's a crystal you may still >>> be able to achieve your desired goal by making the blip 100 times wider >>> and only blipping the crystal every 100th cycle, depending on the >>> crystal Q to sort you out in between. So for 99 cycles it'd just be >>> waking up, doing an increment (or decrement) and a test. You'd be >>> using full current (is it really 5mA _per core_?) for a significant >>> fraction of, a cycle, but it would only be 1% of the time (or less, if >>> you waited more cycles between blips). >> >> This won't have an impact on frequency and phase stability? > > Maybe you just need to build the damned thing and see how it works? It's already built. The question is how to build it well. If you don't understand it, fine. No need to get huffy about it. -- Rick
[toc] | [prev] | [next] | [standalone]
| From | Jim Thompson <To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com> |
|---|---|
| Date | 2015-09-15 14:52 -0700 |
| Message-ID | <on4hva90id6lvos62t5c26sge87lj87qa9@4ax.com> |
| In reply to | #377043 |
On Tue, 15 Sep 2015 11:57:09 -0500, Tim Wescott
<seemywebsite@myfooter.really> 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.
How Rube is your Goldberg ?>:-}
...Jim Thompson
--
| James E.Thompson | mens |
| Analog Innovations | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| San Tan Valley, AZ 85142 Skype: skypeanalog | |
| Voice:(480)460-2350 Fax: Available upon request | Brass Rat |
| E-mail Icon at http://www.analog-innovations.com | 1962 |
I love to cook with wine. Sometimes I even put it in the food.
[toc] | [prev] | [next] | [standalone]
| From | Tim Wescott <seemywebsite@myfooter.really> |
|---|---|
| Date | 2015-09-15 17:50 -0500 |
| Message-ID | <09OdnaJjO-AyPWXInZ2dnUU7-X2dnZ2d@giganews.com> |
| In reply to | #377062 |
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: > >>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. > > How Rube is your Goldberg ?>:-} > > ...Jim Thompson Complexity is _fun_! -- Tim Wescott Wescott Design Services http://www.wescottdesign.com
[toc] | [prev] | [next] | [standalone]
| From | Jim Thompson <To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com> |
|---|---|
| Date | 2015-09-15 16:12 -0700 |
| Message-ID | <0a9hva981frui7k41lsi9ukpm010jsknan@4ax.com> |
| In reply to | #377066 |
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:
>>
>>>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.
>>
>> 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.
An unbuffered inverter makes a perfectly fine crystal oscillator...
because it's ONLY ONE-STAGE of gain.
...Jim Thompson
--
| James E.Thompson | mens |
| Analog Innovations | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| San Tan Valley, AZ 85142 Skype: skypeanalog | |
| Voice:(480)460-2350 Fax: Available upon request | Brass Rat |
| E-mail Icon at http://www.analog-innovations.com | 1962 |
I love to cook with wine. Sometimes I even put it in the food.
[toc] | [prev] | [next] | [standalone]
| From | Tim Wescott <seemywebsite@myfooter.really> |
|---|---|
| Date | 2015-09-15 22:45 -0500 |
| Message-ID | <vs-dnahKTvVYeGXInZ2dnUVZ5sidnZ2d@giganews.com> |
| In reply to | #377067 |
On Tue, 15 Sep 2015 16:12:39 -0700, 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: >>> >>>>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. >>> >>> 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. It'd be an interesting science project to find out. > An unbuffered inverter makes a perfectly fine crystal oscillator... > because it's ONLY ONE-STAGE of gain. True. I chose to go down Rick's road because it's more fun, but unless I were really, really constrained somehow I think that on an actual project I'd use a store-bought oscillator, or something built around a 'U04 gate. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com
[toc] | [prev] | [next] | [standalone]
| From | Jim Thompson <To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com> |
|---|---|
| Date | 2015-09-15 22:06 -0700 |
| Message-ID | <83uhva1b3uuc8llaq08lskuiaf48pg8m03@4ax.com> |
| In reply to | #377088 |
On Tue, 15 Sep 2015 22:45:09 -0500, Tim Wescott
<seemywebsite@myfooter.really> wrote:
>On Tue, 15 Sep 2015 16:12:39 -0700, 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:
>>>>
>>>>>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.
>>>>
>>>> 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.
>
>It'd be an interesting science project to find out.
>
>> An unbuffered inverter makes a perfectly fine crystal oscillator...
>> because it's ONLY ONE-STAGE of gain.
>
>True. I chose to go down Rick's road because it's more fun, but unless I
>were really, really constrained somehow I think that on an actual project
>I'd use a store-bought oscillator, or something built around a 'U04 gate.
'U04 = UNBUFFERED inverter... the most difficult part in the ON-Semi
74HCxx repertoire for me to convert to their new process... matching
up gain and phase.
...Jim Thompson
--
| James E.Thompson | mens |
| Analog Innovations | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| San Tan Valley, AZ 85142 Skype: skypeanalog | |
| Voice:(480)460-2350 Fax: Available upon request | Brass Rat |
| E-mail Icon at http://www.analog-innovations.com | 1962 |
I love to cook with wine. Sometimes I even put it in the food.
[toc] | [prev] | [next] | [standalone]
| From | Robert Baer <robertbaer@localnet.com> |
|---|---|
| Date | 2015-09-15 22:24 -0700 |
| Message-ID | <z27Kx.37671$w27.21994@fx01.iad> |
| In reply to | #377067 |
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: >>> >>>> 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. >>> >>> 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. > > 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..
[toc] | [prev] | [next] | [standalone]
| From | Martin Brown <|||newspam|||@nezumi.demon.co.uk> |
|---|---|
| Date | 2015-09-16 09:19 +0100 |
| Message-ID | <mtb8lo$p1$1@speranza.aioe.org> |
| In reply to | #377110 |
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... -- Regards, Martin Brown
[toc] | [prev] | [next] | [standalone]
| From | Robert Baer <robertbaer@localnet.com> |
|---|---|
| Date | 2015-09-16 19:44 -0700 |
| Message-ID | <9OpKx.21290$bU1.6693@fx15.iad> |
| In reply to | #377134 |
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.
[toc] | [prev] | [next] | [standalone]
| From | rickman <gnuarm@gmail.com> |
|---|---|
| Date | 2015-09-17 00:07 -0400 |
| Message-ID | <mtde6u$h9l$1@dont-email.me> |
| In reply to | #377254 |
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? 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. -- Rick
[toc] | [prev] | [next] | [standalone]
Page 1 of 3 [1] 2 3 Next page →
Back to top | Article view | sci.electronics.design
csiph-web