Shop OBEX P1 Docs P2 Docs Learn Events
eeprom limit in bs2 vs bs2sx — Parallax Forums

eeprom limit in bs2 vs bs2sx

cayfordbcayfordb Posts: 22
edited 2009-03-30 15:27 in BASIC Stamp
Hi. New to the Basic Stamp world, but not new to the computer world. The BS2 is too much fun!

I have a bs2sx, and I'm running with the Mac version of the BS2 development system.

I find I'm running out of EEPROM due to too much code. I get the message something like "Out of EEPROM" when I hit Run. Seems that the compiler thinks I only have the EEPROM space from the BS2, not the BS2sx.


The memory map shows I have about 2k of EEprom, even though the bs2sx specs say there is 16k.

I reduced things to this little bit o code:

' {$STAMP BS2sx}
' {$PBASIC 2.5}


fill_up_eeprom        DATA        (1990)

DEBUG        CLS, "Hello BS2!", CR




By varying the number in the DATA line, then bringing up the Memory map, I can see how much is used. Even with the BS2SX though, with about 2K used it taking up all the EEPROM.

Any ideas here? Could this be due to the Mac version of the Development System not knowing that the BS2SX has more memory?

My first accomplishment has been to recognize the remote codes from my Tivo remote control, my Onkyo Remote, and Sony remote. It works! Surprise, the bit order is reversed between the LIRC remote codes and the BS2 examples in the manuals and exercises.

Thanks in advance

-- Cayford

Comments

  • ForrestForrest Posts: 1,341
    edited 2009-03-29 16:44
    The BS2SX has 2K EEPROM x 8 banks - it's not one contiguous 16K area. To use the other banks of EEPROM, check the RUN command in the Stamp Manual , available here www.parallax.com/Portals/0/Downloads/docs/prod/stamps/web-BSM-v2.2.pdf

    The BS2SX also has some Scratchpad RAM, which are accessible with the GET and PUT commands.
  • cayfordbcayfordb Posts: 22
    edited 2009-03-29 17:47
    Oh! I see. Thanks. In other words, put main code in Slot 0, Big-subroutine in slot 1, second big subroutine in slot 2, etc, and pass parameters in RAM using Put and Get?


    -- Cayford

    Post Edited (cayfordb) : 3/30/2009 3:30:07 PM GMT
  • ForrestForrest Posts: 1,341
    edited 2009-03-29 21:16
    Sounds like a good plan to me
  • cayfordbcayfordb Posts: 22
    edited 2009-03-30 15:27
    Thanks. I got the second slot working. Without the puts and gets for now, just shared variables in ram. This is such a throwback to the old days of programming, when "goto" statements were acceptable, and overloading variables was the only way to get things to fit.
Sign In or Register to comment.