Shop OBEX P1 Docs P2 Docs Learn Events
Mini Mp3/Keyboard Project... Need some help/advice — Parallax Forums

Mini Mp3/Keyboard Project... Need some help/advice

northendtroopernorthendtrooper Posts: 1
edited 2008-04-03 16:54 in BASIC Stamp
Hello, My name is Austin Schmitz and I am taking Basic Stamp at BSU for my Electronic Technical Degree.
For our last project we have to come up with a project that uses the Stamp and Circuitry all on our own.
Our Project is coming along quick fast and in a hurry with no issues until now. When we access our Keyboard mode we try push and hold a "Key" down to get a smooth tone out of the speaker, unfortunately we can not accomplish this with out a Burp after the FREQOUT command, its like you can actually hear the speaker turn on and off throughout the LOOP. We are getting annoyed with it fast and I am here asking if you guys had any problems like this before and have any solutions.
I have attached the Pseudo Code for the Project so Please Feel Free to critise and put your Input on what we need to do to get rid of that·silly bleep in the tone.
Thank you,
Austin Schmitz

Post Edited By Moderator (Chris Savage (Parallax)) : 4/3/2008 4:37:38 PM GMT

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2008-04-03 16:35
    Hello,

    The BASIC Stamp is a single-tasking microcontroller. When you execute the FREQOUT command it plays the tones for the specified duration. After that duration has elapsed it then loads and executes the next instruction so the speaker if off at this point. Once the button has been checked it then re-executes the command. So the results you’re getting are normal in this case.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • stamptrolstamptrol Posts: 1,731
    edited 2008-04-03 16:54
    One solution is to build a small off-board oscillator circuit from a few inverters or a 555. Have it set at the tone you want then simply have the Stamp turn it on when needed and off when the button is released.

    Cheers,

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tom Sisk

    http://www.siskconsult.com
    ·
Sign In or Register to comment.