Quote:
Originally posted by Ohgary
If its variables he ran out of then ram doesnt help that. It might be the way the variables are being used. He might be saving Bitwize variables as bytes. Adding memory is pretty easy but its serial memory and you have to write code to save to memory.
You just load and unload the variables needed at any given time. The Basic Stamp IIsx has 8 pages of program memory which allows you to block your variable groups much more easily. I've successfully used up to 64 double word variables at one time. You just have to get creative and use your imagination.
When you change a page have it load all the variables from your serial (there are other types you CAN use) RAM to your chips registers, and when you leave that page have it load all the variables back to the serial RAM. As a bonus, this makes it all easily accessable from the other pages without having to tie up your 'scratchpad memory'.
The reason you use external RAM instead of internal EEROM memory space for variable use is that you can only write so many times to any address. If you exceed this limit, you'll end up with a dead byte (which sucks). RAM on the other hand allows practically limitless writes. But you knew that already!