# Thread: NAND gate as an oscillator

1. Hey everyone. I am trying to use NAND gate as an oscillator and wanted to know why do we use a capacitor in the circuit? Can it work without one? My oscillator doesn't seem to be working without the capacitor.Thanks for the help

2.

3. Originally Posted by fine
Hey everyone. I am trying to use NAND gate as an oscillator and wanted to know why do we use a capacitor in the circuit? Can it work without one? My oscillator doesn't seem to be working without the capacitor.Thanks for the help
If we treat the oscillator circuit as quasi-linear, then the necessary (but not sufficient) conditions for a stable oscillation are for a net loop phase shift of zero (or other integer multiple of 2*pi) radians, and a loop gain magnitude of unity.

Without the capacitor, the NAND gate may not produce sufficient phase shift before the gain goes to unity.

In principle, some NAND gates could be used in an oscillator without the addition of an external capacitor, but it's unlikely in practice.

4. Hey Fine,

Re my help with your toggle switch question; if someone helps you it is polite to say thank you. Where are your manners dude?

OB

5. A capacitor acts like a barrier to current flow. Current will not flow unless there is sufficient p.d. To bridge the gap. When the gap has beem bridged a one is produced. When it is not you have a zero. Hence a capacitor is an oscillator.

6. Originally Posted by fiveworlds
A capacitor acts like a barrier to current flow. Current will not flow unless there is sufficient p.d. To bridge the gap. When the gap has beem bridged a one is produced. When it is not you have a zero. Hence a capacitor is an oscillator.
This makes even less sense than your posts on mathematics.

Current will not flow unless there is sufficient p.d. To bridge the gap.
In which case you will cause breakdown and destroy the capacitor.

Hence a capacitor is an oscillator.
It really isn't. It can be used, in combination with a resistor, to define the time constant for an oscillator. But it will not oscillate by itself.

7. ...Okay. There is also another method of using a rotary switch.

8. Originally Posted by fiveworlds
...Okay. There is also another method of using a rotary switch.
How do you use a rotary switch to make an oscillator? Do you know what the word "oscillator" means?

9. Yes unfortunately there is multiple meanings however this is about electronics so I am sticking to that definition Electronic oscillator - Wikipedia, the free encyclopedia. If I use a rotary switch which is one of many methods the switch can rotate through multiple channels etc. http://en.m.wikipedia.org/wiki/Rotary_switch

10. I still fail to see any connection between an oscillator (an electronic circuit which produces a, typically sinusoidal, output at a single frequency) and a mechanical device which can connect different signal wires.

11. Say I used 1 channel in a rotary switch. The switch turns at a specific rate and only produces a 1 output every turn of 360°. So an oscillator

12. Originally Posted by fiveworlds
Say I used 1 channel in a rotary switch. The switch turns at a specific rate and only produces a 1 output every turn of 360°. So an oscillator
I would not call a mechanical device driven by a motor, an "oscillator". But maybe I am just being narrow minded.

It is certainly irrelevant to the OP's question of how to use a NAND gate (effectively, a very high gain inverting amplifier) as an oscillator.

13. I never said motor driven. Cogs/springs etc work just as well. A Cd is motor driven though for a simple example. A nand gate is merely a set of restitors which only produce a zero when all input wires are "on". You can certainly oscillate the output/input. However if you edit the gate itself it is not a nand gate.

14. Originally Posted by fiveworlds
I never said motor driven. Cogs/springs etc work just as well.
It is not going to generate an output for very long then (nor at a very consistent frequency).

A Cd is motor driven though for a simple example.
Example of what? A CD player is not a rotary switch nor is it an oscillator. You seem to be incapable of staying on one topic. Oh look, a butterfly.

A nand gate is merely a set of restitors which only produce a zero when all input wires are "on".
No, it isn't. It is a circuit constructed from transistors designed to have very high gain so that a small change of input signals will force the output to 0 or Vdd. (But, yes, the output will only be 0 when all inputs are high. Which is why it can be used as an inverting amplifier, and hence to create an oscillator.)

You can certainly oscillate the output/input.
The question was not about "oscillating the input"; it was about how to use the NAND gate as an oscillator. If you don't understand these things, you probably shouldn't post irrelevant and unhelpful answers.

However if you edit the gate itself it is not a nand gate.
No one is suggesting "editing" the gate (whatever that means).

15. Originally Posted by Strange
Originally Posted by fiveworlds
I never said motor driven. Cogs/springs etc work just as well.
It is not going to generate an output for very long then (nor at a very consistent frequency).
Nonsense my analogue watch keeps accurate time for seven weeks.
A Cd is motor driven though for a simple example.
Originally Posted by Strange
Example of what? A CD player is not a rotary switch nor is it an oscillator. You seem to be incapable of staying on one topic. Oh look, a butterfly.
I think you are confused as to what a switch.is precisely.
A nand gate is merely a set of restitors which only produce a zero when all input wires are "on".
Originally Posted by Strange
No, it isn't. It is a circuit constructed from transistors designed to have very high gain so that a small change of input signals will force the output to 0 or Vdd. (But, yes, the output will only be 0 when all inputs are high. Which is why it can be used as an inverting amplifier, and hence to create an oscillator.)
Transistors are normally used however that doesnt mean I have to use transistors.
You can certainly oscillate the output/input.
Originally Posted by Strange
The question was not about "oscillating the input"; it was about how to use the NAND gate as an oscillator. If you don't understand these things, you probably shouldn't post irrelevant and unhelpful answers.
A NAND gate is not an oscillator. It is an AND gate followed by a NOT gate to produce a precise output graphable on a truth table.

16. Originally Posted by fiveworlds
Transistors are normally used however that doesnt mean I have to use transistors.
Given the context of the question, it is pretty obvious what was meant.

A NAND gate is not an oscillator.
No, but it can be used as an amplifier to build an oscillator. Sheesh.

It is an AND gate followed by a NOT gate
No it isn't. An AND gate is created by putting an inverter stage on a NAND gate.

17. Originally Posted by Strange
Originally Posted by fiveworlds
Transistors are normally used however that doesnt mean I have to use transistors.
Given the context of the question, it is pretty obvious what was meant.
A NAND gate is not an oscillator.
No, but it can be used as an amplifier to build an oscillator. Sheesh.
It is an AND gate followed by a NOT gate
No it isn't. An AND gate is created by putting an inverter stage on a NAND gate.
No a NAND gate produces an exact precise specified output. I can make a NAND gate using 2 pressure switches. If I have a train switching station to switch trains from one rail to the other. If I have a train on both tracks the trains will not switch tracks causing a crash...

18. Originally Posted by fiveworlds
I can make a NAND gate using 2 pressure switches.
Of course you can. And you can build a Turing machine from an infinitely long strip of paper instead of buying a PC.

But that has got nothing at all to do with the subject of this thread. Please stop posting irrelevant nonsense.

19.

20. Originally Posted by fiveworlds
Your posts are worse than useless, fiveworlds. Luckily for the OP, he seems to have left the building, but others happening upon this thread will be confused by the utter crap you posted.

Rotary switch as an oscillator? Nonsensical idiocy. When you try to "rescue" your garbled reply by alluding to "switching between channels," you fail to grasp that the oscillating part isn't in the switch, it's in the circuitry that gives you multiple channels.

It's fine to be ignorant, but it's not fine to pretend otherwise and post stupid crap that will only confuse. Stick to your area of expertise, whatever that might be. But it ain't electronics. Or physics.

21. Here is one I forgot an AND gate circuit diagram consisting of 2 diodes File:AND gate diode.svg - Wikipedia, the free encyclopedia and a not gate consisting of diodes Logic Gates | Tutorvista.com. Plus some documentation on diodes. Diode - Wikipedia, the free encyclopedia. However both PMOS and CMOS can be considered oscillators http://en.m.wikipedia.org/wiki/Inverter_(logic_gate). Oscillators convert dc to ac but there is no reason why a NAND gate would not produce a dc output. A NAND gate makes a logical decision thats all. Oscillators are typically inverters but not all inverters are oscillators. Similarly while NMOS,CMOS and PMOS gates are oscillators all I would need to do is place a diode in series with my output and the gate is no longer an oscillator. While still logically being a NAND gate.

22. BTW, a capacitor oscillates similarly to a drumhead oscillating.

I've seen NAND gate oscillators with three in series, probably to make a time delay.

Probably, the capacitor (and maybe with a series resistor to make a voltage divider) "grounds" the output temporarily, again, for a time delay.

Let's see ... anything else ... uh, fiveworlds, you seem ambitious — I'll give you that much.

23. Originally Posted by fiveworlds
Here is one I forgot an AND gate circuit diagram consisting of 2 diodes File:AND gate diode.svg - Wikipedia, the free encyclopedia and a not gate consisting of diodes Logic Gates | Tutorvista.com. Plus some documentation on diodes. Diode - Wikipedia, the free encyclopedia. However both PMOS and CMOS can be considered oscillators http://en.m.wikipedia.org/wiki/Inverter_(logic_gate). Oscillators convert dc to ac but there is no reason why a NAND gate would not produce a dc output. A NAND gate makes a logical decision thats all. Oscillators are typically inverters but not all inverters are oscillators. Similarly while NMOS,CMOS and PMOS gates are oscillators all I would need to do is place a diode in series with my output and the gate is no longer an oscillator. While still logically being a NAND gate.
And again, you demonstrate that, not only do you have no clue at all about what makes an oscillator oscillate, you insist on pretending that you do. Stop it. You are spouting nonsensical anti-information.

Whether you use NAND gates or inverters doesn't matter. Oscillation isn't dependent on (or prevented by) the "decision-making" properties of the active element in question. If you knew anything about (linear) oscillators, you'd know that there are two necessary (but not sufficient) conditions:

1) The total phase shift around the loop must be an integer multiple of 360 degrees at the desired frequency of oscillation.
2) The gain around the loop at that same frequency must be unity. (In practice, the gain is made greater than unity, and the amplitude simply grows until a saturating nonlineary reduces the effective gain to unity). The oscillation traces a trajectory in phase space known as a "limit cycle" to practitioners of the art.

The NAND gate, when used in an oscillator circuit, is not functioning as a NAND gate at all. It is simply being used as an amplifying element. Practical circuits will often use things like feedback resistors to "bias" the gate into acting as a linear element, rather than as a digital element.

Capacitors are used to control the amount of phase shift at a given frequency, and thus control the frequency of oscillation (in conjunction with one or more resistors; the circuitry inside the NAND gate can provide some of this resistance).

Diodes are often used to protect the circuit, because it is possible for the voltages to go below 0V and above the supply voltage in some cases. Appropriately connected diodes can be used to "clamp" voltages to within a safe range.

Please stop posting about subjects you clearly don't understand. You are fooling no one, but you are adding noise. Just stop.

24. Originally Posted by jrmonroe
BTW, a capacitor oscillates similarly to a drumhead oscillating.
No, not at all. A capacitor by itself is not oscillatory at all. Instead of a drumhead, a capacitor is analogous to a tranquil tank of water.

I've seen NAND gate oscillators with three in series, probably to make a time delay.
Sort of. It's not time delay per se that does the job. It's a specific amount of phase shift. One gate usually does not provide sufficient phase shift to satisfy the conditions I cite in my previous post to fiveworlds. Three generally do.

Some chips have an internal architecture that does provide substantial phase shift with a single gate (including inverters), and an oscillator can be made with one "gate" in such cases. What's important is not the gate count at all, but the phase shift (and associated gain) that such an element provides.

25. Originally Posted by tk421
Originally Posted by jrmonroe
BTW, a capacitor oscillates similarly to a drumhead oscillating.
No, not at all. A capacitor by itself is not oscillatory at all. Instead of a drumhead, a capacitor is analogous to a tranquil tank of water.

I've seen NAND gate oscillators with three in series, probably to make a time delay.
Sort of. It's not time delay per se that does the job. It's a specific amount of phase shift. One gate usually does not provide sufficient phase shift to satisfy the conditions I cite in my previous post to fiveworlds. Three generally do.

Some chips have an internal architecture that does provide substantial phase shift with a single gate (including inverters), and an oscillator can be made with one "gate" in such cases. What's important is not the gate count at all, but the phase shift (and associated gain) that such an element provides.
In the electronic-hydraulic analogy, which Oliver Heaviside sarcastically referred to as the "drain-pipe analogy", a capacitor acts like a drumhead, allowing some effective flow of electrons until pressure reverses the flow, again and again, although it decays. And, yes, like an isolated drumhead receiving a thump will vibrate, an isolated capacitor receiving an impulse will oscillate. If you put a capacitor on a bench and give it an impulse on one lead (maybe by touching it), it will sit there and oscillate.

Being digital, a NAND gate phase shift is 180°, so that's why I called it time delay. Otherwise, it is saying that three NAND gates in series is 540° phase shift, which will cause oscillations, where 180° will not do. It would be talking about the same phase shift because 540° equals 180°.

26. Originally Posted by jrmonroe
In the electronic-hydraulic analogy, which Oliver Heaviside sarcastically referred to as the "drain-pipe analogy", a capacitor acts like a drumhead, allowing some effective flow of electrons until pressure reverses the flow, again and again, although it decays. And, yes, like an isolated drumhead receiving a thump will vibrate, an isolated capacitor receiving an impulse will oscillate. If you put a capacitor on a bench and give it an impulse on one lead (maybe by touching it), it will sit there and oscillate.
You are apparently completely unaware of the meaning of Heaviside's analogy, and of specifically how it applies to the topic at hand. In particular, you have severely muddled the domain of circuit theory with that of electromagnetic field theory.

An ideal capacitance, in a circuit that contains no other energy storage elements, cannot oscillate. The dynamical equations of state will contain only one eigenvalue. Hence oscillation is impossible. No drumhead.

What Heaviside is talking about is how a real capacitor, with its nonzero physical extent, always has associated with it other modes of energy storage besides the electrostatic one of a pure capacitance. There is, for example, energy stored in the magnetic field associated with any currents. And at high enough frequencies, energy will be distributed in some fashion along the structure. In short, he's pointing out that all real elements are never "pure" elements. Thus, an impulsive excitation, with its infinitely broad spectrum, will show oscillatory (including radiative) behavior. That's the drumhead.

None of that applies to the NAND gate oscillator question. At all. Invoking Heaviside is worse than useless here. It is downright misleading.

Ciruict theory, where voltages and currents replace the field-based descriptions of Maxwell, truncates Maxwell's equations by assuming, effectively, that the speed of light is infinite, precluding radiation. An equivalent condition is that all physical dimensions are very small compared to the wavelength of the highest frequency of interest in the analysis of the circuit. Imposing this condition gives us a quasistatic subset of Maxwell's equations, eliminating the coupling terms that give rise to radiation, and eliminating the drumhead. That gives us the world of conventional electrical engineering, with capacitors, resistors and inductors. Wires are wires, not antennas, in this world. This is the world that a NAND gate inhabits. One does not design a NAND gate oscillator with Maxwell's equations (although it can be a fun intellectual exercise to try). So stop invoking Heaviside's quote about drumheads. It's just plain irrelevant here.

In the oscillator case, as long as the wavelength of the expected oscillation is much greater than the largest dimensions of the capacitor you will use (including the length of its wires), the capacitor is a capacitor. Period. The oscillation frequency will be determined by a combination of the capacitance value and the characteristics of the NAND gate, as well as of any other circuit components one might add (e.g., resistors).

Being digital, a NAND gate phase shift is 180°, so that's why I called it time delay.
A time delay would not produce 180 degrees phase shift, except at one frequency (homework excercise: Graph the phase vs. frequency behavior of a time delay). You've horribly muddled things still further. I really wish that well-meaning folks like you would simply refrain from posting until they've understood things better. You know that you've never actually designed nor actually analyzed an oscillator, so why do you feel competent to argue?

A true time delay element takes any input signal and produces an output that looks exactly the same as the input signal, but delayed by some fixed amount of time. Read that description, and compare it to what you say a NAND gate does. Can't you see that these are two COMPLETELY different behaviors?

Otherwise, it is saying that three NAND gates in series is 540° phase shift, which will cause oscillations, where 180° will not do. It would be talking about the same phase shift because 540° equals 180°.
Hopeless. Just stop, please. You haven't a clue about the proper domains of applicability of abstractions.

My previous post states correctly the two necessary conditions for oscillation for a (quasi)linear oscillator. Don't ignore them, for they are correct. They fully explain why a single inverter (or NAND gate) will, in general, fail to oscillate (which the "propagation delay" model given in digital textbooks will not explain). They will also fully explain why a single NAND gate that includes more elaborate circuits CAN oscillate.

27. Post #1 is the first mention of "capacitor".
Post #26 (yours) is the first mention of "capacitance".
I never said that an ideal capacitance could oscillate.
I have never heard of a capacitor compared to "a tranquil tank of water". Please explain this, not only for my edification, but for fiveworlds' as well. I'm sure he will appreciate it.
I am well acquainted with Heaviside's analogies and with the theoretical properties of components.

Originally Posted by tk421
an impulsive excitation, with its infinitely broad spectrum, will show oscillatory (including radiative) behavior. That's the drumhead.
Yes, this is what I said, thank you. It is not, however, what fiveworlds meant about a capacitor as an oscillator, which seemed to involve dielectric breakdown.

Invoking Heaviside is worse than useless here. It is downright misleading ... stop invoking Heaviside's quote about drumheads.
I only brought it up regarding an oscillating capacitor, upon which you agree (see above).

The oscillation frequency will be determined by a combination of the capacitance value and the characteristics of the NAND gate, as well as of any other circuit components one might add (e.g., resistors).
Yes, I intimated as much.

A time delay would not produce 180 degrees phase shift, except at one frequency
Yes, oscillators typically oscillate primarily at only one frequency (at any given time). Harmonics may exist to some extent (hopefully minor).

well-meaning folks like you would simply refrain from posting until they've understood things better. You know that you've never actually designed nor actually analyzed an oscillator, so why do you feel competent to argue?
I *am* well-meaning, thank you. You're amazingly psychic to know such intimate facts about my life and my mind, unfortunately today is not one of those days.

A true time delay element takes any input signal and produces an output that looks exactly the same as the input signal, but delayed by some fixed amount of time. Read that description, and compare it to what you say a NAND gate does. Can't you see that these are two COMPLETELY different behaviors?
Yes, I erred, and thank you tk421 for correcting me here. I meant that the inversion was time-shifted. If there was no delay in the inversion or in the feedback, an inverter of any kind would not oscillate.

Hopeless. Just stop, please. You haven't a clue about the proper domains of applicability of abstractions.
Sorry, I thought we were applying real components, not abstractions.

BTW, I am an EE who studied under Michael Savic, who invented, among other things, an impedance-based method for the controlled cryosurgery of tumors that is in use today. Savic used to have arguments with one of our theory professors about Savic's real-life applications versus circuit theory. Again and again, the theory professor would argue that Savic's applications won't work; Savic would argue that they do. Funny thing, I've never heard of the theory professor ever inventing anything. I also worked as a systems engineer for many years at an blue-chip multinational electronics company, analyzing circuitry and troubleshooting failures to the discrete component level. When other blue chip companies couldn't isolate their failures, they would send them to me. Even our system testing proved superior to their component testing.

28. Originally Posted by jrmonroe
Post #1 is the first mention of "capacitor".
Post #26 (yours) is the first mention of "capacitance".
To the OP, I am quite certain that the distinction is wholly unimportant, which was my point. You were busy discussing irrelevancies, while the OP wants to know the main story, which is a circuit problem, not an E&M one.

I never said that an ideal capacitance could oscillate.
That isn't the issue. See above.

I have never heard of a capacitor compared to "a tranquil tank of water". Please explain this, not only for my edification, but for fiveworlds' as well. I'm sure he will appreciate it.
Once again, we have to choose an appropriate level of abstraction to answer the question actually asked. For circuit analysis, the symbol we draw for a capacitor is...a capacitor. A lumped element. One whose behavior is described by a single state variable, and therefore one for which Heaviside's "sloshing water tank" analogy is wrong.

I am well acquainted with Heaviside's analogies and with the theoretical properties of components.
That's fine, but you need also to develop a sense for which analogy should be trotted out in a given circumstance. As I've already explained at length, circuit design uses a quasistatic subset of Maxwell's equations. Your Heaviside analogy does not apply there.

Originally Posted by jrmonroe
Originally Posted by tk421
an impulsive excitation, with its infinitely broad spectrum, will show oscillatory (including radiative) behavior. That's the drumhead.
Yes, this is what I said, thank you. It is not, however, what fiveworlds meant about a capacitor as an oscillator, which seemed to involve dielectric breakdown.
I'm impressed that you were able to make any sense at all out of what fiveworlds wrote. In any case, even if your speculation were correct, it has nothing at all to do with the OP. I'm trying to answer that original question. I'm asking you to butt out if you can't help.

Originally Posted by jrmonroe
Invoking Heaviside is worse than useless here. It is downright misleading ... stop invoking Heaviside's quote about drumheads.
I only brought it up regarding an oscillating capacitor, upon which you agree (see above).

Originally Posted by jrmonroe
The oscillation frequency will be determined by a combination of the capacitance value and the characteristics of the NAND gate, as well as of any other circuit components one might add (e.g., resistors).
Yes, I intimated as much.
No, I'm not letting you get away with that. In the drumhead analogy, the frequency-determining elements involve the physical dimensions of the "capacitor" in an intimate way. One does not capture these in a simple schematic of the type found in textbooks on using digital gates as oscillators. That is because, as I've pointed out several times now, these oscillators operate in the circuit realm (where "lumped" parameters apply), not in the distributed "drumhead" regime you keep trying to shoehorn into this discussion.

Originally Posted by jrmonroe
Originally Posted by tke421
A time delay would not produce 180 degrees phase shift, except at one frequency
Yes, oscillators typically oscillate primarily at only one frequency (at any given time). Harmonics may exist to some extent (hopefully minor).
You missed the importance of my correction. I'll try again. Students of digital electronics are often told to think of the dynamics of gates as being well-modeled as a time delay in cascade with the logical function. Extending that simple delay model into the oscillator design problem is the source of the OP's problem. A true delay is capable of an arbitrarily large amount of phase shift. However, a real logic gate will typically act as an element whose dynamics are well approximated as possessing a single eigenvalue. Thus any design intuition based on a time delay model will fail to explain why a single inverting gate won't oscillate, because according to the model, it should. I gave the proper explanation.

Originally Posted by jrmonroe
Originally Posted by tk421
well-meaning folks like you would simply refrain from posting until they've understood things better. You know that you've never actually designed nor actually analyzed an oscillator, so why do you feel competent to argue?
I *am* well-meaning, thank you. You're amazingly psychic to know such intimate facts about my life and my mind, unfortunately today is not one of those days.
Sorry if you feel insulted, but it is obvious that you don't know how oscillators function. The fact that you obsess about irrelevancies, and fail to talk about the factors that actually matter in oscillator design suffice to inform. No psychic powers are needed.

BTW, I am an EE who studied under Michael Savic, who invented,
Congratulations -- it sounds like he accomplished something very important. However, the relevance of bringing up the association escapes me. I hope that you're not attempting some form of an argument from authority. You must understand that such an argument would be as unpersuasive as if I were to tell you that my neighbor won a Nobel.

29. The OP hasn't been to this forum for ten days, so he stopped reading this thread at Post #3. I should have made myself clear that I was attempting to speak to fiveworlds at his apparent level of understanding. I mentioned the "drumhead" capacitor analogy only once.

I graciously defer to tk421's ideal capacitance, eigenvalues, and quasistatic subsets of Maxwell's equations. Fiveworlds, listen to him and take notes. This guy knows his stuff.

30. Originally Posted by jrmonroe
The OP hasn't been to this forum for ten days, so he stopped reading this thread at Post #3.
Very good point. I had not taken the trouble to make note of that.

I should have made myself clear that I was attempting to speak to fiveworlds at his apparent level of understanding. I mentioned the "drumhead" capacitor analogy only once.
You are to be commended for being able to discern what his question was -- that's a true skill! -- and for your generous attempt at answering it. Much more than half the time, I can't even figure out what he's saying.

31. I am sorry I am really thankful for all the help I get here. Thank you

32. Guys I am more confused now than I was when I first asked the question. I am a beginner student so please be patient with me I will learn hopefully

33. You probably need to find a book with some good practical examples. Back in the day, this was one of the books I learned from: CMOS Cookbook, Second Edition: DON LANCASTER, Howard M. Berlin: 9780750699433: Amazon.com: Books

I don't know if there is something newer/better.

This was good, too: Amazon.com: The Art of Electronics (9780521370950): Paul Horowitz, Winfield Hill: Books
But pricey. You could look for a second-hand copy on Abe Books.

34. Hello friend i want to tell you that capacitor is a major part of oscillator because the frequency and time constant is decided by capacitor with one more elemet. for further you can ask me on thread or you can email me i will give you a video on it.

35. Originally Posted by fine
Guys I am more confused now than I was when I first asked the question. I am a beginner student so please be patient with me I will learn hopefully
Strange's recommendations are good ones; I happen to favor Horowitz and Hill (now in its third edition), so if you can find a copy, buy it (or at least peruse it in the library).

Here's a simplified explanation of an oscillator. It leaves out some details (on purpose), so it can be criticized for incompleteness and lack of generality. But it applies to the OP.

The basic oscillator recipe is this: Take an amplifying element, and wrap feedback around it. If there exists a frequency where the total phase shift around the loop is an integer multiple of 360 degrees where the amplification factor is unity, then oscillation is possible. The frequency at which those conditions are simultaneously satisfied is a possible oscillation frequency. If there are multiple frequencies satisfying this condition, the system might actually oscillate at multiple frequencies simultaneously.

Now, what is phase shift, and where does it come from? If you drive any practical system with a sinusoidal voltage, the output will be somewhat displaced in time (delayed) relative to the input. That delay, expressed as an angle, is the phase shift. In general, that delay (phase shift) is not constant; it will be a function of frequency. The simplest model for the frequency behavior of an amplifier is an "RC low-pass" model. If you drive a series connection of a resistor and capacitor with a sinusoidal voltage, the voltage across the capacitor will decrease monotonically in amplitude as the frequency increases (that's why it's called a "low-pass" circuit), while the phase lag simultaneously increases for a while, heading asymptotically to a maximum lag of 90 degrees. The product of R and C happens to have the dimensions of time, so its recipriocal is a frequency. In the case of an oscillator, the RC product shows up in a direct way. When driven at a frequency (in hertz) of 1/(2*pi*RC), the RC circuit will exhibit a phase shift equal to -45 degrees (half the maximum), and produce an output whose amplitude is 1/sqrt(2) times that of the input. Expressed (improperly, but all textbooks do it) in decibel form, that corresponds to a 3dB reduction in round numbers.

Now take an amplifier that inverts. That inversion by itself gives you 180 degrees. Combining that with one RC gets you to not quite 270 degrees. The C can be externally provided, or it can come from the ever-present capacitance inherent in all devices (and wiring), or a combination. The R can similarly be externally provided, or come from the internal resistance of the transistors making up the gate, or some combination.

However the RC is provided, one more RC can get you to almost 360, but "almost" doesn't count. You need three. That explains why you frequently see three gates in a typical "digital" oscillator circuit (I'm treating an integer multiple of 360 as the same as zero).

Note the word "frequently." It is possible to use more elaborate connections of R and C to permit a single stage to oscillate. An example is a network consisting of three resistors and three capacitors, all connected around a single gate.

The explanation I've given above, incomplete as it is, nevertheless is less filled with errors than the simple explanation given in digital design textbooks. I suspect your OP stems from having read such an explanation, so let me comment on what's wrong with the standard story.

In those poorly written textbooks, a logic gate's dynamic behavior is characterized by a pure and constant "propagation delay" parameter. Then the textbook usually proceeds to use that parameter to explain why a three-inverter cascade -- with a wire connecting the output of the last stage to the input of the first -- will oscillate at a frequency inversely proportional to that total delay (the usual formula given for the oscillation frequency is 1/2tpd, where tpd is the total propagation delay through the three gates). But that model predicts that a single inverting gate (which includes a suitably connected NAND) should also oscillate (just at triple the frequency). However, one typically observes that a single gate with feedback will not oscillate at all (it will usually mock you with a stable DC output somewhere around half the supply voltage), or feebly at some frequency unrelated to the propagation delay.

Note the absence of any explicit mention of R or C in the standard digital textbook's explanation.

Why is that a problem? The problem is using a model beyond its domain of applicability. Characterizing a gate's dynamics by a constant (especially frequency-independent) delay is too crude. It's fine for estimating the speed of digital circuits (where delay is all that matters), but not for predicting oscillation (where the amount of phase shift needs to be modeled accurately). A pure delay can provide an unlimited amount of phase shift. A real stage can't (and using a single RC model, we see it's bounded to 90 degrees of phase shift). The difference between "infinite" and "90" is rather large. And that is the whole problem here. Once you realize that the propagation delay model breaks down for a single-stage textbook gate oscillator, you'll cease to be puzzled as to why it fails to predict what is observed. It's the classic case of applying a model where the model does not apply.

 Bookmarks
##### Bookmarks
 Posting Permissions
 You may not post new threads You may not post replies You may not post attachments You may not edit your posts   BB code is On Smilies are On [IMG] code is On [VIDEO] code is On HTML code is Off Trackbacks are Off Pingbacks are Off Refbacks are On Terms of Use Agreement