Shop OBEX P1 Docs P2 Docs Learn Events
EEPROM Full error — Parallax Forums

EEPROM Full error

ArchiverArchiver Posts: 46,084
edited 2001-07-19 15:29 in General Discussion
Hello,
I have worked with the STAMP2 for some time but I
have not had this error until now..My programs are
only about a 100 lines but I am using about 20 lines
of DEBUG Statements. I always get the error highlited
ion a debug statement. If I remove a couple of them
it works ok... Suggestions..
Thanks, Ray

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2001-07-18 16:48
    Ray, you might try using serout 16, commands instead of debug. They seem to
    take up less room.

    Sid
  • ArchiverArchiver Posts: 46,084
    edited 2001-07-18 17:18
    Ray,

    You can check on memory usage using CTRL-M
    while in the Stamp editor. Remember, you only
    have 2KB to work with, and having lots of text to
    display will start eating up that memory in a hurry.

    If you post your program to the list, I'm sure you'll
    receive half a dozen great tips on how to streamline
    your code. Another option would be to dump your
    text to a serial EEPROM and just fetch it as needed.
    I believe there are some examples of this in the Stamp
    manual.

    Best regards,

    Steve


    <<Hello,
    I have worked with the STAMP2 for some time but I
    have not had this error until now..My programs are
    only about a 100 lines but I am using about 20 lines
    of DEBUG Statements. I always get the error highlited
    ion a debug statement. If I remove a couple of them
    it works ok... Suggestions..
    Thanks, Ray·>>




    [noparse][[/noparse]Non-text portions of this message have been removed]
  • ArchiverArchiver Posts: 46,084
    edited 2001-07-18 17:59
    --- In basicstamps@y..., Newzed@a... wrote:
    > Ray, you might try using serout 16, commands instead of debug.
    They seem to
    > take up less room.
    >
    > Sid

    Thanks Sid,
    I did not realize that DEBUG took up
    so much memory, I will have to redo
    some of the program.
    Ray.
  • ArchiverArchiver Posts: 46,084
    edited 2001-07-18 21:20
    It's amazing how immense the space needed by DEBUG
    statements is. I'm trying to cut down on mine with
    subroutines for repeated items. For instance, three
    times I have the statement:

    DEBUG "To clear alarm, turn Mode switch to Off.", CR

    By creating a labeled subroutine and making three
    calls to it with GOSUB, the bytes consumed are reduced
    from 222 to 96 (and to 73 if I can be less verbose).
    This technique should help me stay within the margins
    of the program slots I'm already using, since I'm
    rather fond of my current implementation but must add
    some features.

    If you need minimal data to recover and are using the
    BS2E/SX/P, consider using the shared memory area
    (GET/PUT) and using an entire program slot for
    messages. I have five or six data items I need to keep
    track of (cycle number, process line, target
    pressure), but could imagine calling a subroutine to
    store these and then going to the message slot and
    picking up when I return.

    Bob Pence

    --- rayw@m... wrote:
    > Hello,
    > I have worked with the STAMP2 for some time but I
    > have not had this error until now..My programs are
    > only about a 100 lines but I am using about 20 lines
    > of DEBUG Statements. I always get the error
    > highlited
    > ion a debug statement. If I remove a couple of them
    > it works ok... Suggestions..
    > Thanks, Ray
    >
    >
    > To UNSUBSCRIBE, just send mail to:
    > basicstamps-unsubscribe@yahoogroups.com
    > from the same email address that you subscribed.
    > Text in the Subject and Body of the message will be
    > ignored.
    >
    >
    > Your use of Yahoo! Groups is subject to
    > http://docs.yahoo.com/info/terms/
    >
    >


    __________________________________________________
    Do You Yahoo!?
    Get personalized email addresses from Yahoo! Mail
    http://personal.mail.yahoo.com/
  • ArchiverArchiver Posts: 46,084
    edited 2001-07-19 03:24

    Original Message
    From: Pence Bob <bobpence_2000@y...>
    To: <basicstamps@yahoogroups.com>
    Sent: Wednesday, July 18, 2001 1:20 PM
    Subject: Re: [noparse][[/noparse]basicstamps] EEPROM Full error


    > It's amazing how immense the space needed by DEBUG
    > statements is. I'm trying to cut down on mine with
    > subroutines for repeated items. For instance, three
    > times I have the statement:
    >
    > DEBUG "To clear alarm, turn Mode switch to Off.", CR
    >
    > By creating a labeled subroutine and making three
    > calls to it with GOSUB, the bytes consumed are reduced
    > from 222 to 96 (and to 73 if I can be less verbose).
    > This technique should help me stay within the margins
    > of the program slots I'm already using, since I'm
    > rather fond of my current implementation but must add
    > some features.
    >
    > If you need minimal data to recover and are using the
    > BS2E/SX/P, consider using the shared memory area
    > (GET/PUT) and using an entire program slot for
    > messages. I have five or six data items I need to keep
    > track of (cycle number, process line, target
    > pressure), but could imagine calling a subroutine to
    > store these and then going to the message slot and
    > picking up when I return.
    >
    > Bob Pence
    >
    > --- rayw@m... wrote:
    > > Hello,
    > > I have worked with the STAMP2 for some time but I
    > > have not had this error until now..My programs are
    > > only about a 100 lines but I am using about 20 lines
    > > of DEBUG Statements. I always get the error
    > > highlited
    > > ion a debug statement. If I remove a couple of them
    > > it works ok... Suggestions..
    > > Thanks, Ray
    > >
    > >
    > > To UNSUBSCRIBE, just send mail to:
    > > basicstamps-unsubscribe@yahoogroups.com
    > > from the same email address that you subscribed.
    > > Text in the Subject and Body of the message will be
    > > ignored.
    > >
    > >
    > > Your use of Yahoo! Groups is subject to
    > > http://docs.yahoo.com/info/terms/
    > >
    > >
    >
    >
    > __________________________________________________
    > Do You Yahoo!?
    > Get personalized email addresses from Yahoo! Mail
    > http://personal.mail.yahoo.com/
    >
    > To UNSUBSCRIBE, just send mail to:
    > basicstamps-unsubscribe@yahoogroups.com
    > from the same email address that you subscribed. Text in the Subject and
    Body of the message will be ignored.
    >
    >
    > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
    >
    > Reply,
    Thanks Bob. Sub Routines seem like the way to go to save memory..
    I will re do my programs to compensate.
    Thanks Ray
  • ArchiverArchiver Posts: 46,084
    edited 2001-07-19 06:26
    Hi Bob,

    Another way to save lots of space if you have lots of messages is to
    store them in eeprom, and use a routine to read them out. Each
    character in a literal string in a debug or serout command uses 14
    bits of eeprom, while the same character stored in eeprom occupies
    only 8 bits. Thus, you quickly reach a point where storage as DATA
    in eeprom compensates for the small program routine it takes to read
    it out.

    alarm data "To clear alarm, turn Mode switch to Off.",13,0
    aiuda data "call 911!",13,0

    ' subroutine to display message
    ' enter this subroutine with the start address of the message
    display:
    read address,char
    if char=0 then displayexit
    debug char
    address=address+1
    goto display
    displayexit
    return

    Debug and serout are substantially the same. The debug command
    automatically pushes the baudmode and the pin number onto the stack,
    while in serout those values are fetched from the program eeprom and
    then pushed on the internal expression stack. From then on out the
    two commands are practically identical. For insight into how the
    commands actually work, see Brian Forbes' book. It really gets into
    the nitty gritty of this stuff.

    -- regards,
    Thomas Tracy Allen Ph.D.
    electronically monitored ecosystems
    mailto:tracy@e...
    http://www.emesystems.com


    >It's amazing how immense the space needed by DEBUG
    >statements is. I'm trying to cut down on mine with
    >subroutines for repeated items. For instance, three
    >times I have the statement:
    >
    > DEBUG "To clear alarm, turn Mode switch to Off.", CR
    >
    >By creating a labeled subroutine and making three
    >calls to it with GOSUB, the bytes consumed are reduced
    >from 222 to 96 (and to 73 if I can be less verbose).
    >This technique should help me stay within the margins
    >of the program slots I'm already using, since I'm
    >rather fond of my current implementation but must add
    >some features.
  • ArchiverArchiver Posts: 46,084
    edited 2001-07-19 15:16
    Newzed -

    In testing with the Memory Map in stampw.exe version
    1.1, I find only incidental differences in memory
    consumption between DEBUG and SEROUT 16 statements. In
    my small data set, it appears that one does not
    consistently take more space than another.

    SEROUT offers the advantage of transmitting
    configurations other than 8N1 @ 9600, while DEBUG has
    the advantage of opening up the debug window in the
    Stamp Editor, rather than using Hyperterminal.

    Bob Pence

    --- Newzed@a... wrote:
    > Ray, you might try using serout 16, commands
    > instead of debug. They seem to
    > take up less room.
    >
    > Sid
    >
    > To UNSUBSCRIBE, just send mail to:
    > basicstamps-unsubscribe@yahoogroups.com
    > from the same email address that you subscribed.
    > Text in the Subject and Body of the message will be
    > ignored.
    >
    >
    > Your use of Yahoo! Groups is subject to
    > http://docs.yahoo.com/info/terms/
    >
    >


    __________________________________________________
    Do You Yahoo!?
    Get personalized email addresses from Yahoo! Mail
    http://personal.mail.yahoo.com/
  • ArchiverArchiver Posts: 46,084
    edited 2001-07-19 15:29
    In a message dated 7/19/01 9:24:39 AM Central Daylight Time,
    bobpence_2000@y... writes:


    > SEROUT offers the advantage of transmitting
    > configurations other than 8N1 @ 9600, while DEBUG has
    > the advantage of opening up the debug window in the
    >

    You can still use the DEBUG window(s) with SEROUT 16. You just need to open
    a window manually (when the editor sees DEBUG in the code you just
    downloaded, this happens automatically) and set the baud parameters to match
    your program. I do this all the time -- saves the trouble of running a
    separate terminal program.

    -- Jon Williams
    -- Applications Engineer, Parallax


    [noparse][[/noparse]Non-text portions of this message have been removed]
Sign In or Register to comment.