What limits the variables in BS2p
gncguy
Posts: 35
I was programming my Boe-bot and trying to put more sphiscated algorithms.· I am interested in adding digital filters to the code.· but I got an error message saying there were too many variables.· I have looked at the Stamp comparison page and it mentions memory but it does not mention a limt on the number of variables.· I had 8 word length variables.· How can you work with 15 pins with only 8 variables?· doe using byte length variables allow you to have more variables?
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen
http://forums.parallax.com/forums/default.aspx?f=25&m=112788
There's some special additional storage on some Stamps. The BS2p series have "scratchpad RAM" in different amounts. This is volatile storage that can be accessed one byte or one word at a time and some locations have special functions (see the manual) as well as being accessible with some of the I/O commands like SERIN and SEROUT.
In your post you said you had "8 word length variables". You MUST have had other variable space assigned, since you ought to be able to assign up to 13 WORD length variables with no problem. As Mike pointed out there are a total of 26 BYTES in RAM, and each WORD is 2 BYTES long; thus 26 / 2 = 13 WORD sized variables.
Regards,
Bruce Bates
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"Genius is one percent inspiration and ninety-nine percent perspiration."
Thomas Alva Edison