Shop OBEX P1 Docs P2 Docs Learn Events
Add memory to Boe-Bot — Parallax Forums

Add memory to Boe-Bot

kingbpkingbp Posts: 22
edited 2012-04-12 02:56 in General Discussion
Hi I have a boe-bot with Bs2 microcontroller that only has 2k of memory I want to know if it is possible to add memory to the boe-bot because my memory is full, is their a device I can buy from parrallax to do this.

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2012-04-11 20:50
    No. You cannot add program memory to a BS2.

    The other Stamp models have additional program memory, but the additional memory does not allow you to write larger programs. It allows you to load what are essentially several separate programs into the Stamp. Each program is limited to 2K, but you can have several of them and they can sort of work like overlays for each other. You'll just have to figure out how to make your program smaller. Often eliminating or shortening DEBUG statements will make a huge difference. Often identifying similar pieces of code and making them into subroutines will save a lot of space. Post your program as an attachment to a message and we'll make some suggestions. Please DO NOT cut and paste your program into a message.
  • kingbpkingbp Posts: 22
    edited 2012-04-11 21:09
    So The BS2 can only save one program at a time but if i buy something like 16KB Industrial I2C EEPROM can i save two programs to the eeprom or copy and paste two programs in one file and have enough memory for my project.
  • Mike GreenMike Green Posts: 23,101
    edited 2012-04-11 21:26
    No, it doesn't work that way. The BS2 can only have one 2K program stored in its EEPROM and you can't add additional EEPROM to it. The Stamps can store data in an EEPROM attached to a pair of I/O pins, but that is completely different from the program storage. The other Stamp models have different size EEPROMs of which up to 16K can be used for up to 8 x 2K "slots" each containing a program. These programs work somewhat like overlays and can share variable values.
  • Martin_HMartin_H Posts: 4,051
    edited 2012-04-12 02:56
    The 2KB can hold a fair amount when the code is well organized. I have found that reading the code top to bottom with an eye towards code clean up usually lets me squeeze in a few more lines. While I am doing this I comment and format the code to look nice.

    The 26 bytes of RAM for variables usually requires reuse of the same variable in many ways. I find it easy if I view them as processor registers rather than variables in a high level language. The 1302 real time clock contains a small amount of RAM that you can load and store to using serial commands, but that can work against code space.

    I also have a BS2e and the code banks were hard to use at first, but easy once I got the hang of it. I have never run out of program space on it.
Sign In or Register to comment.