Offset sine output? Var freq and amplitutde?
buckey29
Posts: 6
First, I'm a newbie to some of this stuff. However, I did do a lot of searching on the internet and various sites including several of the Parallax manuals (all excellent I must say!) but didn't find something quite like I want to do.
What I want to do is to use a basic stamp to:
1. Create a sine wave out on two seperate pins.
2. Each of the 2 pins should be able to output a sine wave form 150hz to 2khz, which is controllable
via a variable or pot input.
3. I want to vary the amplitude of each independantly
4. I want the output (amplitutde and freq) to be continously variable. Reading some manuals implies that if I use freqout, the pin outputs the pwm, then stops and I have to tell it to start again. I want this to be continuous, and variable without a break in the output sine wave.
Am I asking too much? If this is possible I would appreciate any thoughts, or links to some examples that may help.
(Think of a cross fade stereo effect - see picture)
What I want to do is to use a basic stamp to:
1. Create a sine wave out on two seperate pins.
2. Each of the 2 pins should be able to output a sine wave form 150hz to 2khz, which is controllable
via a variable or pot input.
3. I want to vary the amplitude of each independantly
4. I want the output (amplitutde and freq) to be continously variable. Reading some manuals implies that if I use freqout, the pin outputs the pwm, then stops and I have to tell it to start again. I want this to be continuous, and variable without a break in the output sine wave.
Am I asking too much? If this is possible I would appreciate any thoughts, or links to some examples that may help.
(Think of a cross fade stereo effect - see picture)
Comments
Generating decent sine waves is a difficult task at best, and moreso directly from any digital resource, including digital microcontollers. That being said, your additional criteria of adjusting both the frequency and amplitude, on the fly, makes it all the more difficult.
I won't say that it can't be done, but you'll find it to be a quicker and easier task if you use the Stamp as a driver for any of the various waveform generator chips that are available. I don't happen to know of a 2-channel chip, but it wouldn't surprise me if there wasn't one out there that might reveal itself after a bit of searching research.
Regards,
Bruce Bates
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·1+1=10
http://www.exar.com/products/XR2206v103.pdf
Not sure how to interface the BS to this yet, but if anyone has some input I'd greatly appreciate it.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·1+1=10
As another thought, I could use the freqout to control the sweep or modulation of the sin out for some intersting effects.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax