How can I increase propeller memory?
NikosG
Posts: 705
Hello all,
I was working with my propeller proto board in a very cool project and I saw the following message on my monitor:
Obviously I became out of memory. I tried to tidy my code and I gained some space temporarily. As i tried to use a new object the problem appeared again. How can I increase my propeller memory? Can I do something with software or with the hardware?
I was working with my propeller proto board in a very cool project and I saw the following message on my monitor:
Obviously I became out of memory. I tried to tidy my code and I gained some space temporarily. As i tried to use a new object the problem appeared again. How can I increase my propeller memory? Can I do something with software or with the hardware?
Comments
http://www.parallax.com/tabid/828/Default.aspx
BTW I've just ordered from Parallax store a micro-SD Card Adapter. I hope that it will help me.
Thanks!
Nikos,
I will run under Widows also.
If your code is somewhat modular (logical sections that all don't have to run all the time), you could try using Dr_Acula's KyeDos. KyeDos will reload the Propeller memory with different code, from a SD card, depending on what is needed. It helped with a project I had that was running out of memory.
Duane
Do you have large amounts of data stored in memory?
As Mike said it's not an easy task to use external memory for program storage but data storage isn't nearly as difficult. EEPROM is probably the easiest to use external memory. There is also SRAM and flash as options for external memory (and, of course, SD cards). Oh, and Jazzed even has a board that uses SDRAM.
Maybe you have a large array that can be moved to external memory?
Strings are also a good candidate to store externally.
There are also ways of reclaim RAM that held PASM code after the PASM has been copied into a cog. Although again, you can't easily use the reclaimed RAM for program code, just data.
As Publison pointed out, BST's unused method eliminator is probably the easiest first step in free up some RAM. I use BST with Windows myself.
You can also post your code and see if others can find a way of changing your program to use less RAM.
Duane
Thank you!
My project is a Propeller solar tracker based on time calculation (real time and date or hypothetical time and date)
The first module calculates the altitude and the azimuth for a given date. It creates an array with tree columns TIME, ALTITUDE and AZIMUTH. The number of rows varies and it depends from the length of the day and the frequency of the calculations. (For instance if I run the code for 16 July 2011 and take the results every 1 minute from Sun rise to sun set I have approximately 863 rows. If I take results every 1 hour I have17 rows).
[The above logical section has very complicate formulas (because of lot of trigonometry) and uses the F32 object (Till now I have no problem).
The second module gives a graphic representation of the solar orbit in the TV screen.
It has as input the ALTITUDE and AZIMUTH in a given time ant it draws the Suns position in the polar map on the TV screen.
This module can work independently from the first module for one couple of ALTITUDE and AZIMUTH. This module uses the "TV" and "Graphics" SPIN objects. The problem starts when I try to combine both modules in order to have the whole solar path.
In addition there is and a third module (not ready yet) that takes ALTITUDE and AZIMUTH and drives two motors (servo or stepper) in order to drive a xy rotated base toward the Sun.
Here is my XY-base using two steppers with a laser on top (I hope that Parallax will create a more beautiful XY base as a commercial product)
(Obviously I'll need more memory for this)
I also haven't take into account the memory I need for the code that manipulates the DS1302 time circuit and for the code that manipulates the mini Keyboard or external keyboard or mouse circuit in which user will be able give data.
As you can understand I need a lot of memory!.
The idea of Dr_Acula's KyeDos sounds very good! where can I find more about this? I 'm waiting the SD card and some crystals from my parallax order, to put all together and try again.
The only way I've gottne the probelm is to use a second Propeller chip.
I think there are ways to use external memory as a TV buffer but that method is still over my head.
I've seen suggestions of not "double buffering" to save momory. I understand what is meant but again I don't know how to do this.
I have used a serrial connection between two Propellers. The first Propeller does the calculations and sends the data to the second Propeller to display on a TV.
Duane