Shop OBEX P1 Docs P2 Docs Learn Events
More space? — Parallax Forums

More space?

CassLanCassLan Posts: 586
edited 2009-02-28 20:44 in Propeller 1
Hi Guys, its been a while, I'm glad to see some of the same faces as well as new ones.

I've undertaken a project using the propeller and I just have one question...

Is there anyway to add more space for the program?
I'm assuming that the program loads into prop ram from the eeprom so the prop ram is your programs size·limit?

I'm also figuring on writing all data to the eeprom or other external device to not waste any room.

Thanks,

Rick

Comments

  • mctriviamctrivia Posts: 3,772
    edited 2009-02-28 16:47
    my propmod comes with an extra 32kB of eeprom. if clever you could write extra PASM code into the top half of the eeprom buffer it into ram when you need it then load it. Could be done with almost no extra foot print if:

    1) at start up you loaded a cog with a pasm code that as one of its tasks can load the eeprom contents)
    2) when you need to load new cogs that cog downloads the pasm code into where it had been residing in ram
    3) execute the cog.

    If you wanted to shut down the loader cog you would have to first copy it's code back from the eeprom to ram or you would not be able to start it again.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Need to make your prop design easier or secure? Get a PropMod $50CAN has crystal, eeprom, and programing header in a 40 pin dip 0.7" pitch module.
  • Mike GreenMike Green Posts: 23,101
    edited 2009-02-28 17:15
    You can't add more memory to the 32K of RAM and 32K of ROM (and 2K per cog) that's built into the Propeller. You can connect all sorts of external memory to the Propeller, but it's treated as an I/O device. The easiest and lowest impact way to add memory is to use a larger EEPROM. The Propeller bootloader only looks at the 1st 32K of the attached EEPROM, so you can use any additional EEPROM for data or storing programs. If you plan to do a lot of writing, you can use a FRAM (www.ramtron.com) which looks to the Propeller like an I2C EEPROM, but is more tolerant of repeated writing.

    There are a variety of routines in the Propeller Object Exchange to access I2C memory. Look at "Basic_I2C_Driver" for a simple set of routines to do this. Loading a new program is a little more difficult. There's an EEPROM loader that's part of FemtoBasic from the Object Exchange. You can incorporate this loader (and its I/O routines) into your programs.
  • jazzedjazzed Posts: 11,803
    edited 2009-02-28 17:22
    I like the idea of loading COGs from EEPROM or SDFLASH to reclaim spin code space. Several of us·discussed it last month; no code came from it though. Everyone got sidetracked or were otherwise busy. There is a table of options I posted here:
    http://forums.parallax.com/showthread.php?p=776824

    Mike didn't mention his Propeller O/S ... it is the closest "available" solution to your problem. Perhaps Mike didn't understand your question. Maybe I misunderstood ....

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    --Steve
  • mctriviamctrivia Posts: 3,772
    edited 2009-02-28 17:38
    I plan to write 1 this week and next as drivers for my propmod will make available on obex when done.

    I forgot about loading from sd . I included a uSD card reader on my propmod for loading files never thought of for code

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Need to make your prop design easier or secure? Get a PropMod $50CAN has crystal, eeprom, and programing header in a 40 pin dip 0.7" pitch module.
  • Mike GreenMike Green Posts: 23,101
    edited 2009-02-28 17:42
    The "Propeller O/S" doesn't handle an SD card, just multiple EEPROMs. "propDOS" handles an SD card. FemtoBasic's loader can load from either EEPROM or an SD card file. FemtoBasic has been used to make a kiosk controller, loading Spin programs from an SD card in response to keyboard input.
  • jazzedjazzed Posts: 11,803
    edited 2009-02-28 17:58
    Interesting. Does PropDOS load drivers like Propeller O/S?
    Can one squeeze more "program" into propeller using FemtoBasic ?
    How does FemtoBasic perform relative to spin?
    Does FemtoBasic require statements like "20 goto 10"?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    --Steve
  • Mike GreenMike Green Posts: 23,101
    edited 2009-02-28 18:07
    1) PropDOS and the Propeller O/S use essentially the same loader. SD card support was added to an existing EEPROM driver to make the I/O driver used in FemtoBasic. PropDOS uses the FemtoBasic driver.

    2) No

    3) FemtoBasic is written mostly in Spin, so you're working with two layers of interpretation. The main advantage to using FemtoBasic is as a "scripting" program. For example, BoeBotBasic is a version of FemtoBasic that uses the programming port for its console and it has special statements added for things like servos, a PING))), and an HM55B compass. It's very easy to write robotics programs and speed is not that important. Other versions of FemtoBasic have been made with their own specialized statements for particular uses.

    4) Yes. There's a simple manual and a couple of sample programs included in the download from the Object Exchange.
  • CassLanCassLan Posts: 586
    edited 2009-02-28 20:44
    Thank you all.

    I think what will end of taking most of the space is text, and other UI stuff, so I'll put that data on the eeprom as suggested.



    Rick
Sign In or Register to comment.