Shop OBEX P1 Docs P2 Docs Learn Events
using 63 bytes of scratchpad RAM — Parallax Forums

using 63 bytes of scratchpad RAM

ArchiverArchiver Posts: 46,084
edited 2001-11-12 07:52 in General Discussion
Hi all,
I noticed that one of the features that sets the BSIISX apart from
the BSII is that the SX has 63 bytes of scratchpad RAM. Otherwise,
both of them have RAM as 16 word registers. What are the differences
between the two different kinds of RAM? Also, what commands do i need
to use to make use of that scratchpad RAM? Any input would be
appreciated.

Sincerely,
RP

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2001-11-11 19:18
    Hi RP,

    The Bs2-SX has 8 program banks, and each bank has it's own RAM (the 16
    words).
    Beside this, the SX has a scratchpad RAM which can be accessed from ALL
    program banks.
    This is a way to communicate between banks.
    The instructions to use the scratchpad are READ address,byte and WRITE
    address, variable.
    Have a look into the manual for an exemple.
    Have a look at this address for extended explanations :
    http://www.emesystems.com/BS2SX.htm

    Hope this helps,

    Phil.

    Original Message
    Subject: [noparse][[/noparse]basicstamps] using 63 bytes of scratchpad RAM


    > Hi all,
    > I noticed that one of the features that sets the BSIISX apart from
    > the BSII is that the SX has 63 bytes of scratchpad RAM. Otherwise,
    > both of them have RAM as 16 word registers. What are the differences
    > between the two different kinds of RAM? Also, what commands do i need
    > to use to make use of that scratchpad RAM? Any input would be
    > appreciated.
    >
    > Sincerely,
    > RP
  • ArchiverArchiver Posts: 46,084
    edited 2001-11-12 07:44
    Hi,

    The ram for variables is also shared among program banks!!

    Regards peter


    Oorspronkelijk bericht
    Van: Philippe Derenne [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=9vagOlwP1IprQsgjGY_yMDFWdTCgQoRfwKw2W8cGSgQdKED6HiM6ib86JMFG7-NC0zRUaJDm6w]derennep@s...[/url
    Verzonden: zondag 11 november 2001 11:19
    Aan: basicstamps@yahoogroups.com
    Onderwerp: Re: [noparse][[/noparse]basicstamps] using 63 bytes of scratchpad RAM

    Hi RP,

    The Bs2-SX has 8 program banks, and each bank has it's own RAM (the 16
    words).
    Beside this, the SX has a scratchpad RAM which can be accessed from ALL
    program banks.
    This is a way to communicate between banks.
    The instructions to use the scratchpad are READ address,byte and WRITE
    address, variable.
    Have a look into the manual for an exemple.
    Have a look at this address for extended explanations :
    http://www.emesystems.com/BS2SX.htm

    Hope this helps,

    Phil.

    Original Message
    Subject: [noparse][[/noparse]basicstamps] using 63 bytes of scratchpad RAM


    > Hi all,
    > I noticed that one of the features that sets the BSIISX apart from
    > the BSII is that the SX has 63 bytes of scratchpad RAM. Otherwise,
    > both of them have RAM as 16 word registers. What are the differences
    > between the two different kinds of RAM? Also, what commands do i need
    > to use to make use of that scratchpad RAM? Any input would be
    > appreciated.
    >
    > Sincerely,
    > RP



    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/
  • ArchiverArchiver Posts: 46,084
    edited 2001-11-12 07:52
    RP,

    The GET and PUT commands are used to read from and write to Scratch Pad RAM.
    Scratch Pad RAM is volatile memory -- the contents of Scratch Pad RAM, like
    that of the standard 16 word RAM, is erased when the Stamp is powered down.
    The first three words ($0-$2) of standard RAM are associated with Pin data,
    the remaining thirteen words or registers are available for data storage.
    Please note that there is only one bank of 16 word RAM for use by all eight
    (0-7) BS2SX programs. With the exception of Pin data RAM, these compile-time
    variables must be defined at the beginning of each program as bit, nibble,
    byte or word variables, with or without aliases, using the VAR statement.
    Values in standard RAM may be shared between programs when compile-time
    variable definition and order are identical. Scratch Pad RAM may be accessed
    by, and data shared between any of the eight programs without concern for
    compile-time definitions. The READ and WRITE commands are used to access
    nonvolatile EEPROM memory. This memory also stores your programs.

    Byte values are stored in any one of the 63 Scratch Pad RAM locations using
    the following syntax without quotations: "PUT location,value". Location is a
    variable or constant (0-62) that specifies the Scratch Pad RAM location to
    store a value. Value is a variable or constant (0-255) to store in the
    specified Scratch Pad RAM location.

    Byte values are read from any one of the Scratch Pad RAM locations using this
    syntax without quotations: "GET location, variable". Location is a variable
    or constant (0-62) that specifies the Scratch Pad RAM location to read a
    stored value from. Variable is where the value will be stored.

    MR





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