Steve Joblin said...
The BS2 has 12 word variables for your usage.· They are referred to as W0 through W12.· Each Word can be broken down into Bytes, Nibbles, and Bits.
Steve,
·· Minor correction...There are 13 words available.· W0 - W12··
Chris - My bad... I do know better.... Even as I was writing my post, I said to my self "it's twelve plus one for the W0 equals thirteen". Don't know why I wrote 12... Maybe because I was so happy that I actually knew something and could help out a fellow Stamper.
Hope you are enjoying your new gig.... You have no idea how lucky you are! I would give anyting to work at Parallax!!!!
Let's not encourage new programmers to use internal variable names (B0 .. B25, W0 .. W12) as this habit usually leads to difficult-to-find programming errors -- I know because I'm frequently sent such code to "fix."
So, new folks, the BASIC Stamp 2 family has 26 bytes of user RAM which can be configured as Bits, Nibs (4 bits), Bytes, and Words -- you simply declare your variable and its type and the compiler will organize it into RAM for you.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ Jon Williams Applications Engineer, Parallax
Dallas, TX· USA
Comments
Steve,
·· Minor correction...There are 13 words available.· W0 - W12··
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
Hope you are enjoying your new gig.... You have no idea how lucky you are! I would give anyting to work at Parallax!!!!
So, new folks, the BASIC Stamp 2 family has 26 bytes of user RAM which can be configured as Bits, Nibs (4 bits), Bytes, and Words -- you simply declare your variable and its type and the compiler will organize it into RAM for you.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas, TX· USA
How many bytes do bits, nibs, and words equal?
Thanks,
Matt
1 byte = 2 nibs
2 bytes = 1 word