Shop OBEX P1 Docs P2 Docs Learn Events
SoundPal with Propeller — Parallax Forums

SoundPal with Propeller

Glenn IrwinGlenn Irwin Posts: 6
edited 2007-11-24 17:16 in Propeller 1
Is there a way to get the SoundPal to work with the Propeller Chip?

I am using the Propeller Proto-board.
Propeller Port to SoundPal with 4.7 K resistor, pulled up to high with a 10k resistor.
Using Simple_Serial.spin

This code:
SERIAL.start(-1, SOUND_PORT, -9_600)
SERIAL.tx("=")
SERIAL.tx($01)
SERIAL.tx($5D)
SERIAL.tx($00)
SERIAL.tx("!")

Should play reveille, but it does not make a sound.

Any help would be greatly appreciated.

Comments

  • BaggersBaggers Posts: 3,019
    edited 2007-11-23 12:26
    just out of curiosity, should baud rate be (minus) - 9_600 ?
  • Glenn IrwinGlenn Irwin Posts: 6
    edited 2007-11-23 19:16
    I tried it with positive 9600 too. I changed it to -9600 because the manual said that the stop bit should be low instead of high and the Simple_Serial object's documentation said to make the Baud rate negative. Was I wrong?
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2007-11-24 02:30
  • Glenn IrwinGlenn Irwin Posts: 6
    edited 2007-11-24 05:43
    Thanks, it works great! I just put a 4.7K resistor on the data line and it plays. Surprisingly loud for such a tiny thing.

    Thanks for the help.
  • deSilvadeSilva Posts: 2,967
    edited 2007-11-24 09:14
    Adding such a trifle gadget to a Prop is questionable, as it will not require much more code to make a "SoundPal in a COG" than Phils demos show, as a COG is around 10 times more powerful than an ATtiny smile.gif
  • Glenn IrwinGlenn Irwin Posts: 6
    edited 2007-11-24 09:43
    I am planning to use the 32k of memory for more than just making sound. The SoundPal offloads this task quite nicely.

    Good point though.
  • deSilvadeSilva Posts: 2,967
    edited 2007-11-24 10:14
    Adding 32k EEPROM to the Propeller is even simpler than adding the SoundPal and costs $1.50.
    The SoundPal is a good compagnion for BS, as it postpones CPU load to an external device... The Propeller has however MASSES of spare CPU capacity...

    This was my point I bring up from time to time: The propeller was not buit - so I think - to add complex devices to it, but to substitute those complex devices by a few resistors and caps. So adding expensive ADCs, temperature sensors, PICs or AVRs is the "old way"....

    Edit: Typos..

    Post Edited (deSilva) : 11/24/2007 10:41:28 AM GMT
  • Glenn IrwinGlenn Irwin Posts: 6
    edited 2007-11-24 10:18
    I thought the 32K was the limit for a program to run in. Is there a way to swap programs in and out of Ram from an EEPROM?
  • deSilvadeSilva Posts: 2,967
    edited 2007-11-24 10:42
    There are some attemps to do that... Very simple indeed, but there is no support from the Propeller Tool. You need an "overlay concept" that aligns all addresses correctly.

    So EEPROM and SD cards are mostly used for data....
  • hippyhippy Posts: 1,981
    edited 2007-11-24 16:48
    deSilva said...
    Adding such a trifle gadget to a Prop is questionable, as it will not require much more code to make a "SoundPal in a COG" than Phils demos show, as a COG is around 10 times more powerful than an ATtiny smile.gif

    But the code for soundPal emulation does have to designed, written, tested and debugged, so emulating this trifling gadget becomes a major and critical sub-component of the final system. Undoubtedly the Propeller could do all that SoundPal does and more, better and cheaper, but it will take time to get it to work. Full emulation may not be necessary but it still involves reasonable effort.

    I don't see adding a SoundPal as questionable; until someone delivers a SoundPal emulation object it's the quickest and most cost effective solution.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2007-11-24 17:06
    The SoundPAL can also be programmed to operate standalone, requiring just a source of power. For such applications, the Propeller could be a handy — or one's only — means of accomplishing that programming.

    -Phil
  • deSilvadeSilva Posts: 2,967
    edited 2007-11-24 17:16
    Sorry that I do not always lengthily state the background of my remarks. But my point should have been obvious..
Sign In or Register to comment.