Memory in Propeller Programs
Crescendo
Posts: 4
We are trying to store songs in our Propeller program. Right now, it seems that we are only able to store up to 5 songs. Is there any way to increase the memory of our microcontroller to accommodate more songs? Thank you so much.
Comments
For something like songs, the best thing to do would be to add an SD or micro-SD card. These are standard PC-compatible SD or micro-SD cards that can be read by or written to by your PC. There are several I/O driver objects in the Object Exchange that allow you to open files and read or write them from the Propeller. Have a look at FSRW and at Kye's. Also look at AN006.
From a hardware perspective, you just need an SD or micro-SD card and a socket for it, a couple of 10K pull-up resistors, and a little bit of wiring. If you don't want to do that, there are some adapter boards that Parallax and others sell that have the socket and resistors and you just have to connect 4 wires to Propeller I/O pins, plus +3.3V and ground.
You can even store programs in files on the card and there are loaders that can load and run a Propeller program from the card.
I agree with Mike, a SD card seems like it would be the easiest way of adding memory for songs.
There are lots of other memory options as well (SRAM, Flash, EEPROM). In this case, I think all the other options would be harder to use than a SD card.
What Propeller board are you using? Most boards I know have 64K EEPROM. Only 32K (or less) is used for the Propeller program. You might be able to store some extra songs in the upper 32K of your EEPROM. While this wont require extra hardware like the SD card, I think the software would likely be more difficult to write. I just thought I'd let you know about the option.
What kind of format are these songs in? Are they a sequence of notes like the S2's GUI produces?
So we are using the Propeller Demo Board P8X32A-Q44 and the songs are midi files.
We are going to look into Propeller boards with SD cards. Is there one you suggest?
Here's a micro-SD card socket adapter that can plug into the breadboard area of a Demo Board. Parallax also sells a full size SD card socket adapter.