General purpose registers?

I want to start a project using the Arduino Pro mini. At this point I’m trying to figure out if there is enough RAM in the ATmega168V for my application.

This may be a stupid question but… The arduino page states “1K of RAM”, while the datasheet states 1KB of ram with “32 general purpose working registers”. Does this mean that the rest of the 1K is reserved, and I actually have only 32 bytes to work with?

And either way, how much RAM is left after taking into account the C++ compiler overhead?

Hi Neil,

The 32 general purpose registers are used by the compiler, typically to manipulate values in computations. You get to use however much of the 1K ram not used by the runtime code to store your data. The actual amount free for your sketch varies depending on which libraries you use but it’s somewhat less than 900 bytes. Still, its surprising how much can be done with that little memory.

BTW, if you need to store lots of data that doesn’t change (constant strings for example), you can use the progmem command to put this into program memory instead of RAM

Thanks, that answered my question perfectly. I think the ATmega168V should be perfect for my project.