Shop OBEX P1 Docs P2 Docs Learn Events
Expand program memory (EEPROM) — Parallax Forums

Expand program memory (EEPROM)

bob12345bob12345 Posts: 5
edited 2010-02-02 15:36 in BASIC Stamp
Hello,

I have a Basic Stamp 2 BS2PX24 and i've almost used up all the available program memory (EEPROM). Is there a way to increase its memory by adding another external EEPROM chip or is this not possible for program memory? Would it make more sense to just get another Basic Stamp 2 to carry out other tasks·by interfacing it with the current·BS2?·- basically acting as a slave to the BS2PX24?

Thanks for any advice.

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2010-01-15 18:35
    You cannot add external EEPROM for program storage. Are you already using the multiple slots? They're not quite like having more memory for a given program, but some programs fit naturally into a multi-slot design. Think of the slots as overlays.

    If you've already filled up a lot of the slots or your program isn't really suitable for multi-slots, you could use multiple Stamps. Depending on your needs, you could move some tasks into other external controllers. For example, if you're controlling servo motors, you could add a Propeller Servo Controller. There are similar controllers for DC motors.

    You might also consider moving your project to a Propeller. There are several tools available for easing the conversion from PBasic to Spin/Assembly including Bean's new PropBasic compiler which takes a variant of SX/B (based on PBasic and intended for the SX) and compiles it to Propeller assembly code.
  • bob12345bob12345 Posts: 5
    edited 2010-01-15 18:46
    Mike thanks for your reply, I'm unaware of the slot allocation for program memory. I simply looked at the program memory map space from the tool bar and noticed I was starting to run low. I've basically been coding away and obviously running low which is a bit frustrating as I would like to add a number of additional features to the project. How does the multislot program/memory allocation work?

    Thanks
  • dandreaedandreae Posts: 1,375
    edited 2010-01-15 20:01
    The first 2k of memory is located in slot 0 which is shown on the memory map when you first download your program.· You can access other 2k slots of memory by using the "RUN" command.· In the BASIC Stamp Syntax and Reference Manual look on pages 68 and 69 for an explanation and also under the "RUN" command.



    Dave


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Dave Andreae

    Parallax Tech Support·
  • Mike GreenMike Green Posts: 23,101
    edited 2010-01-15 20:04
    There's also a good Nuts and Volts Column (#87) on the subject:
    www.parallax.com/Resources/NutsVoltsColumns/NutsVoltsVolume3/tabid/445/Default.aspx
  • bob12345bob12345 Posts: 5
    edited 2010-01-15 21:16
    Thanks for your help, I'll give it a go and post back if there are any probs.
  • ercoerco Posts: 20,256
    edited 2010-01-18 06:13
    http://forums.parallax.com/forums/default.aspx?f=5&m=414103

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·"If you build it, they will come."
  • bob12345bob12345 Posts: 5
    edited 2010-02-02 11:08
    By using additional slots, can one have a larger number of RAM variables? In other words, if all the RAM was allocated in Slot 0 to variables (bits/bytes/words etc) - shown as full in the memory map, could an extended program in Slot 1 have a new set of variables, just as one can add additional 2k of code?
  • allanlane5allanlane5 Posts: 3,815
    edited 2010-02-02 14:00
    No, all slots use the same set of RAM. "Slots" are simply the way the BS2 allocates eeprom.
  • Tracy AllenTracy Allen Posts: 6,662
    edited 2010-02-02 15:36
    Be aware that in addition to the regular RAM (bits, nibs, bytes, words, ins, outs, dirs) the '2px has 127 bytes of scratchpad RAM. See the GET, PUT and STORE commands.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
Sign In or Register to comment.