How to make a Voltage Controlled Oscillator

On a sunny day (Wed, 27 Oct 2010 08:10:57 -0500) it happened John Fields wrote in :

Since WW 2 US has invaded more then 44 countries. For the bigger ones some of us remember Vietnam, and more remember the Iraq murders.

No way, Russia is much more powerful, and China is working on it too. Maybe in the long ago past, when you could still reach the moon with German technology, but these days the only power is the power of the dollar printing presses. Soon it will cost more in energy to print the dollars than what they can buy in oil.

You history is of course very very limited. Europe has been united many times in the past, for example the Romans, de Karolingen (

formatting link
), Napoleon.

Just as it fell apart at times, so will the US. US already had one civil war. We all know Texas will go back to Mechico, and Californiaaa will be a kingdom with king Arnold Schwarzenegger. Larkin Enterprises will be the biggest company...

Reply to
Jan Panteltje
Loading thread data ...

Jan Panteltje:

I don't remember having called G. W. Bush in any way.

He did good things, such a starting a war in Iraq to keep the terrorists busy down there, following the example of Clinton in ex-Jugoslavia, that started a useless war just to keep the nascent EU busy and divided.

Unluckily he followed Clinton also in the reckless monetary policy concocted by Greenspan.

Reply to
F. Bertolazzi

Jan Panteltje:

Until XVIth century Holland invaded entire continents, trading slaves.

ROTFL. How? Where? Well, in gas starved Europe it has his way, and in the Middle East is still sewing war, but, other than that...

technology,

in oil.

Geez, you came out straight from a soviet.

formatting link
), Napoleon.

All empires put together with democratic elections voted by an homogeneous populace. :D

I can't see why in the world.

Netherlands, the country of free pot...

Reply to
F. Bertolazzi

murders.

France started the problems in Vietnam and yes, Sadam did murder a lot of Iraqi's.

--
Politicians should only get paid if the budget is balanced, and there is
enough left over to pay them.
Reply to
Michael A. Terrell

Jan never lets the truth get in the way of his America bashing.

--
Politicians should only get paid if the budget is balanced, and there is
enough left over to pay them.
Reply to
Michael A. Terrell

This one is probably implemented with delay's (or if in assembly "nop" loops), so it is monophonic. I will have to juggle 3 channels of output, so I'll try to implement it on an interrupt. But thank you for your offer :)

Cem

Reply to
Cem Uzunoglu

Cem Uzunoglu:

Are you familiar with Atmel's AVR controllers? Even the smallest ones have at least one 16-bit PWM output. To change note, you simply have to load a

16-bit compare register. Take a look at the $1 ATtiny24 and his USI, that would allow you to control even more than 3 devices by sending them only note and duration.
--
Saluti
Reply to
F. Bertolazzi

Yup! Actually, in my particular use, I was already using the 16 bit timer, so the tone generator uses one of the 8 bit timers. With prescaler, it acts more like a 10-16 bit timer, so the pitch accuracy is still excellent.

The program only interrupts on note changes, so it takes very little computing power overall.

It is somewhat memory intensive (maybe 1kB/min for typical songs), and would benefit from a packed music format.

Tim

--
Deep Friar: a very philosophical monk.
Website: http://webpages.charter.net/dawill/tmoranwms
Reply to
Tim Williams

Tim Williams:

Thanks for the useful info.

But I narrowly convinced Cem to use only 7 octaves, and for that interval

16 bit + prescaler may turn out to be barely sufficient.

Why? You had only one timer available?

--
Saluti
Reply to
F. Bertolazzi

--
Why would I?

Unlike you, he picked the right device for the job.
Reply to
John Fields

In the US, delayed retirement comes in stages. Depending on birth year:

formatting link

In France, if you were about to turn 60, are you forced to wait until age 62, or is it graduated like the US?

Considering the amount of vacation and breaks the French take while "on the job", the years "worked" would keep most of them from ever retiring :-)

Likewise the Germans (at Bosch)... they took breakfast while "on the clock" :-( ...Jim Thompson

--
| James E.Thompson, CTO                            |    mens     |
| Analog Innovations, Inc.                         |     et      |
| Analog/Mixed-Signal ASIC's and Discrete Systems  |    manus    |
| Phoenix, Arizona  85048    Skype: Contacts Only  |             |
| Voice:(480)460-2350  Fax: Available upon request |  Brass Rat  |
| E-mail Icon at http://www.analog-innovations.com |    1962     |

               I can see November from my house :-)
Reply to
Jim Thompson

And he'd have no podium if you stopped feeding him. ...Jim Thompson

--
| James E.Thompson, CTO                            |    mens     |
| Analog Innovations, Inc.                         |     et      |
| Analog/Mixed-Signal ASIC's and Discrete Systems  |    manus    |
| Phoenix, Arizona  85048    Skype: Contacts Only  |             |
| Voice:(480)460-2350  Fax: Available upon request |  Brass Rat  |
| E-mail Icon at http://www.analog-innovations.com |    1962     |

               I can see November from my house :-)
Reply to
Jim Thompson

[snip]

Slowman probably has never heard of the MC4024 (and its descendants), that I designed ~45 years ago. ...Jim Thompson

--
| James E.Thompson, CTO                            |    mens     |
| Analog Innovations, Inc.                         |     et      |
| Analog/Mixed-Signal ASIC's and Discrete Systems  |    manus    |
| Phoenix, Arizona  85048    Skype: Contacts Only  |             |
| Voice:(480)460-2350  Fax: Available upon request |  Brass Rat  |
| E-mail Icon at http://www.analog-innovations.com |    1962     |

               I can see November from my house :-)
Reply to
Jim Thompson

Well, it only needs one timer, but more to the point of data, that's because of the format I chose.

Oops, I lied -- it does "almost" no computing during a note. It does perform an interrupt and decrement every timer reset. I suppose if you used two timers, you could remove that as well.

Tim

--
Deep Friar: a very philosophical monk.
Website: http://webpages.charter.net/dawill/tmoranwms
Reply to
Tim Williams

If you need a linear sweep from 20 Hz to 20 kHz, the traditional approach would be to use a 100 kHz crystal oscillator and a VCO with a tuning range of 100.020 kHz to 120.000 kHz and mix those two frequencies down and do some low pass filtering.

A more modern approach would be to use a simple processor (PIC etc.) with 32768 Hz interrupt rate (watch crystal) and using the NCO principle, generate any frequency between 0 and 16 kHz.

Reply to
Paul Keinanen

Tim Williams:

Right.

Reply to
F. Bertolazzi

In the 1970s, I made a little tune player with an 8008. I had two overlapping timing loops, one for the note, and another for the duration.

It was just rectangular waves, not strictly "tones", but it got the job done. ;-)

Cheers! Rich

Reply to
Rich Grise

Rich Grise:

In 1981 I did the same with a Z80, an EPROM and the few parts you can easily imagine. It fitted in a cigarette pack and played "Lady Jane".

Mine too: the girl I made it for become my girlfriend.

Seen in retrospect, I should have saved the time & money it took. After a couple years I found her in bed with another engineer.

Mechanical, moreover.

Reply to
F. Bertolazzi

What is special about that interrupt rate?

Reply to
Cem Uzunoglu

Cem Uzunoglu:

The crystal is cheap and covers the audible frequency just enough.

Google "numerically controlled oscillator".

With NCO you will also be able, using much more of the otherwise unused computational resources of the processor and a D/A, to approximate a sinusoid or any arbitrary waveform (the higher the frequency, the lower the resolution).

Reply to
F. Bertolazzi

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.