Infinite duration for freqout?
Evan in L.A.
Posts: 6
Is there a way to have an infinite duration for the freqout command?· If not, what's the best way to keep if from running out?· Also, I assume that if you issue a new freqout command (i.e. a freqout with a different frequency), it will update immediately and not necessarily wait until the previous duration is completed, is that correct?· I basically want to have a tone always present, but change the frequency at different points in the program.· Thanks so much for the help...·
Comments
if you code:
FREQOUT 2, 5000, 2000
HIGH 5
It will sound a tone for 5 seconds before continuing on to put P5 high.
So, what you want can't be done without external hardware with the BASIC Stamp. The SX or Propeller, yes.
-Martin
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Martin Hebel
Personal Links with plenty of BASIC Stamp info
StampPlot - Graphical Data Acquisition and Control
AppBee - XBee ZigBee / IEEE 802.15.4 Adapters & Devices
The Propeller does it even simpler since it has two independent counters in each cog that can generate a frequency on any I/O pin up to about 128MHz and down to less than 1Hz in addition to being able to generate pulses of nearly any complex pattern with programming.
FREQOUT 2, 5000, 1000
FREQOUT 2, 5000, 2000
FREQOUT 2, 5000, 3000
FREQOUT 2, 5000, 4000
etc.
To answer your question more directly: Yes, but it would be a fairly trivial use of a very powerful processor. You could add a couple of resistors and RCA and PS/2 connectors and have a PS/2 keyboard controlled frequency synthesizer with a TV display of the current settings, plus some keyboard controlled digital switches, plus some logic indicators on the display.
Post Edited (Mike Green) : 10/12/2006 6:03:23 PM GMT