Shop OBEX P1 Docs P2 Docs Learn Events
Eeprom — Parallax Forums

Eeprom

shashashasha Posts: 5
edited 2007-08-29 11:47 in BASIC Stamp
hi

I'm using BS2P40 ,
I got the message saying that EEPROM is full.
Actually i didnt have much coding also
but i used lot of debug commands

is it possible me to increse the EEPROM ??

Comments

  • RDL2004RDL2004 Posts: 2,554
    edited 2007-08-01 03:38
    You can't increase the amount of eeprom, but are you using all you have? The BS2p has 8 program slots, maybe you've only filled up one of them? The DEBUG statements will tend to use up a lot of program space though.

    Check out the post below called "multi slot programming"

    http://forums.parallax.com/showthread.php?p=664324

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Rick
  • shashashasha Posts: 5
    edited 2007-08-01 04:37
    hi Rick

    how do i know that I'm using all the slots or one slot ?



    I will try to·deleting·all debug commands,



    thanks
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2007-08-01 06:01
    Shasha -

    If you haven't used the $STAMP directive, or if you have used it, and haven't specified multiple program names within it, then you are NOT using more than one programming slot. Here is a more complete definition of the $STAMP directive and how it is used. This was extracted from the PBASIC Help File:

    quote

    For BASIC Stamp projects (consisting of multiple programs), the $STAMP directive has an option to specify additional filenames. The syntax below demonstrates this form of the $STAMP directive:

    ' {$STAMP BS2e, file2, file3, ..., file8}

    Use this form of the $STAMP directive if a project, consisting of multiple files, is desired. This directive must be entered into the first program (to be downloaded into program slot 0) and not in any of the other files in the project. The file2, file3, etc. items should be the actual name (and optionally the path) of the other files in the project. File2 refers to the program that should be downloaded into program slot 1, file3 is the program that should be downloaded into program slot 2, etc. If no path is given, the path of program 0 (the program in which the $STAMP directive is entered) is used.

    Up to seven filenames can be included, bringing the total to eight files in the project all together. Upon tokenizing, running or viewing program 0 in the Memory Map, the editor will read the $STAMP directive, determine if the indicated files exist, will load them if necessary and change their captions to indicate the project they belong to and their associated program number. After the directive is tokenized properly, and all associated files are labeled properly, tokenizing, running or viewing any program in the Memory Map will result in that program’s entire project being tokenized, downloaded or viewed.

    end quote

    Even more information can be found in the Nuts and Volts Magazine Column Number 87 which can be downloaded from this Parallax web page:
    http://www.parallax.com/html_pages/downloads/nvcolumns/Nuts_Volts_Downloads_V3.asp

    Once you get "cooking" with multi-bank programming, you will probably never see the "Out of EEPROM" message again, unless you are using scads of user EEPROM or you're writing exceptionally large programs. Do realize however, that these "banks" of EEPROM memory are neither continuous nor contiguous in the flat model sense. Their execution sequence is controlled by the programmer, and although there is no real "CALL - RETURN" facility, such a facility can be rather easily developed by the user. Here are some application notes and one method of accomplishing it, on that particular aspect of multi-bank programming called "Cross-bank calls" as well as other considerations:
    http://www.emesystems.com/BS2SX.htm

    Thanks go to Dr. Tracy Allen for those and all of his other excellent PBASIC Applications Notes.

    Regards,

    Bruce Bates
  • GadgetmanGadgetman Posts: 2,436
    edited 2007-08-02 12:09
    If your program isn't that large, but you have a lot of DEBUG messages, why not have the messages as DATA statements and stored in one of the other banks, then write a subroutine which reads the required message from that other bank when you need it.

    Then all you need to do is set a variable and call that Sub every time you need to add a Debug message.
    The sub is just a few lines of code, and won't take up much room, and you can have as many messages as you like in the other bank... (assuming that you 'as you like' is less than 2KB in total... smile.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Don't visit my new website...
  • shashashasha Posts: 5
    edited 2007-08-02 16:04
    Actually my codings will be very long , but still i havent complested all the codes, still i have half way to finish when i got the eeprom full message
  • GadgetmanGadgetman Posts: 2,436
    edited 2007-08-03 12:58
    Yes, but how much of that is DEBUG commands?

    The text portion of a DEBUG command isn't compressed, and can take up a lot of space.

    Also, is your program doing a lot of 'initializing'?
    (Setting variables, preparing peripherals and such that only needs to be run once)
    If so, why not just leave that in SLOT 0, then do a RUN 1, and have the main program in SLOT 1?
    (Not as much hassle as doing a full 'multi-slot' program setup, and may give you enough space)

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Don't visit my new website...
  • shashashasha Posts: 5
    edited 2007-08-29 09:14
    Hi there,
    well, i managed to get use of my slot 1 when my slot 0 memory get fulled. but still i can't get my programme back to slot 0( my main sequence programme) once it switched to the slot 1 programme.
    can you help me on this issue?
  • NewzedNewzed Posts: 2,503
    edited 2007-08-29 11:47
    Whenever slot 1 is ready to return to your main program, just write

    RUN 0

    Sid

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Yesterday is history, tomorrow is a mystery, and today is a gift.

    That is why they call it the present.

    Don't have VGA?
    Newzed@aol.com
    ·
Sign In or Register to comment.