Shop OBEX P1 Docs P2 Docs Learn Events
Micro-controller to Run without PC connected?? — Parallax Forums

Micro-controller to Run without PC connected??

gr8_big_geekgr8_big_geek Posts: 34
edited 2011-08-27 04:58 in Propeller 1
Hello all!

I'm new to this board and have minimal amount of experience in this area...so please forgive me if I sound completely ignorant.

Question(s) -

Is there a way to have your microcontroller run without being attached to a computer? (For instance, you program it all with the PC, if that's what it takes, but then store the program in the memory somehow and then let it run on it's own from then on out).

If so, how?

Also, is there a way to have your microcontroller play a .wav or .mp3 audio file? Say if you press a button (on something like: 4x4 Matrix Membrane Keypad (#27899)) and it plays a .wav file (for an error or authorization being granted or even if you want each button pressed to trigger an audio sound)

Any and/or all assistance in this area would be wonderful.

Cheers~

Comments

  • FranklinFranklin Posts: 4,747
    edited 2011-08-25 03:17
    The stamps do not require a computer to run, just power. Once programmed they will start over at the begining when powered up. As to the wav file you would need to add some additional hardware to do that depending on what capabilities you want.
  • gr8_big_geekgr8_big_geek Posts: 34
    edited 2011-08-25 04:04
    Franklin,

    Thank you for the fast response! Also, many thanks for answering that question about having the microcontroller run the program without being connected to my PC.

    What about the other one though concerning playing the .wav/.mp3? I located this thread here where they had some .spin files to download that would allow you to play .wav files.

    I'm at a loss as to what to buy or where to begin though.

    Here's what I had planned:

    Basic keypad design (which I will make up with my own breadboard) with a total of 12 buttons.

    10 buttons make the same beep sound (from a .wav file) and each has a value (like 1-9 and a funny character like "*").

    1 will be a door bell/call button (or trigger a speaker to sound a certain .wav file in the other room)

    1 will be the enter key (enters the data for checking and sounds the authorization/rejection .wav(s) as appropriate)

    upon authorization I need the door to be unlocked (as the authorization .wav sounds).

    I located this Matrix Membrane Keypad but I'm not sure it will do everything I need. I've worked out the kinks in design and implementation of everything else. I just need to see if I can pull the logistics of this keypad/sound portion together and I will be gold.

    There are a lot of different ways in which I could pull this off but now I'm excited about the learning part of this project.

    I've read mention of a "demo board" but what kind? What sort of hardware would I need? Also, I've read about an SD card...? What part is that and how do I begin working it into the microcontroller or is there some sort of demo board that ties all of this in together (using the .spin program file type)?

    I'm curious but a bit lost right now. Any help leading me further in the correct direction would be great.

    Thanks~
  • Mike GreenMike Green Posts: 23,101
    edited 2011-08-25 08:13
    The membrane keypad you referenced should do what you want except that it has 16 keys. If you really want 12 keys, you can find identical keypads in a 3 x 4 layout. Notice that Parallax's webstore page has links to sample programs for the keypad, both for the Basic Stamp and the Propeller.

    The Demo Board is probably not what you want. Most of the I/O pins of the Propeller are used for specific purposes to demonstrate the capabilities of the Propeller. There are only 8 available for other things. A better choice would be the Propeller Protoboard or the QuickStart board.

    Look at the Propeller application notes here. AN006 particularly deals with using an SD card. You might also look at EFX-TEK's AP-16+ board as an example of what can be done.
  • jazzedjazzed Posts: 11,803
    edited 2011-08-25 08:52
    Is there a way to have your microcontroller run without being attached to a computer? (For instance, you program it all with the PC, if that's what it takes, but then store the program in the memory somehow and then let it run on it's own from then on out).

    If so, how?
    The Propeller can start up without a PC attached.
    The start program can be stored in the Propeller's external EEPROM.

    There are several .wav file players for Propeller that use SD card for .wav file storage.
    Playing .mp3 with Propeller is "impossible" without an external decoder chip.
  • MicrocontrolledMicrocontrolled Posts: 2,461
    edited 2011-08-25 15:08
    If your .wav file is small/short enough, you could store it directly on the Propeller's boot EEPROM and have it loaded into RAM on boot. Rayman has an object he released that does all of this for you.
    And, of course, the Propeller can run without being connected to a computer. I would suggest using the Propeller over the Stamp, as the stamp has no software for playing WAV files so you would have to use an external chip.
  • StefanL38StefanL38 Posts: 2,292
    edited 2011-08-26 09:19
    if the sound doesn't have to be an exact copy of something you recorded as a wavfile creating sound can be done on the propeller without using wav-files.
    there are several sound-chip emulations in the obex.
    As you are a complete newbee - programming microcontrollers is fun. Especially the propeller-chip. But things aren't as easy as pluging in a USB-device and everything works. You the
    programmer have to take care of most of the details.

    So if you are willing to learn how to program and going up a learning curve welcome to the propeller-forum

    keep the questions coming
    best regards

    Stefan
  • KyeKye Posts: 2,200
    edited 2011-08-26 13:25
    Posted a reply for you on the kiss wav player page. As StefanL38 said, this is a DIY place. So you'll have to get the project going yourself and figure out how todo it. But if you have a road block come to the forum to get any questions answered.

    Thanks,
  • kwinnkwinn Posts: 8,697
    edited 2011-08-26 22:17
    gr8_big_geek, FYI MP3 files are compressed to save space and require a lot of processing to decompress. The .wav files are not compressed so they are much easier for the Propeller to process. With the cost of SD storage dropping and the storage capacity increasing there is no pressing reason to use MP3. A 2 gig SD card will hold over 3 hours of music in .wav format. Your PC can be used to copy .wav files from a CD or other source to the SD card, and free programs (such as Audacity) can be used on your PC to convert MP3 files to .wav files and then be put on your SD card.
  • MicrocontrolledMicrocontrolled Posts: 2,461
    edited 2011-08-27 04:58
    Other programs other than Audacity that you can use (so that you can convert multiple ones at once) are the Danusoft WAV converter and Format Factory, if you set to high quality in the WAV Output Settings.
Sign In or Register to comment.