Continuous FREQOUT
buckey29
Posts: 6
I'm using the freqout command to output two frequencies - example 1000hz and 1001hz. The sin waves start in phase, go out of phase and back into phase. I am trying to figure how to calcuate a proper time to play the freqout so that it starts and stops in phase. Does that make sense?
freqout 1, 1000, 1001, <what value here>
And how could I calculate that for various pairs of frequencies that I may use? And if there is a formula (I'm sure there is) can I just double the time to play two complete phases?
Thanks in advance for any help.
freqout 1, 1000, 1001, <what value here>
And how could I calculate that for various pairs of frequencies that I may use? And if there is a formula (I'm sure there is) can I just double the time to play two complete phases?
Thanks in advance for any help.
Comments
·· You could try a larger duration.· Also, are you using the recommended filter circuit for connecting to your audio device (Or do you have a PDB)?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
So, is there no way to calculate this that you are aware of?
The BFO has a frequency of 1Hz, so I would think that the pause duration would be 1000mS or 1 second
or a multiple of that.
For 1000Hz and 1002Hz ---> 500mS
1000Hz and 1005Hz ---> 200mS
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
beatduration = 1000 ' milliseconds
freqout 1, beatperiod, 1000, 1001
would give a 1 second single cycle of the 1 hertz beat frequeny. (That is for the BS2 and BS2e only. The faster stamps have different parameters--See the manual) The beat frequency is
f2 - f1
and the one cycle beat duration is
1 / (f2 - f1) in seconds
On the BS2 stamp use,
beatduration = 1000 / (f2 - f1)
The slowest beat you can get on a Stamp is one second. What are you trying to do??
If you attach an LED you get a nice pulsing effect, or for audio a soft attack or bell like effect if you let it go for 1/2 or 1 period.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com