Arduino Duemilanove- How much can it hold?

How much memory (both size and approximate amount of lines) can my arduino duemilanove hold?

If it has the Atmega168; then 16K (2 of which are taken up by the bootloader, leaving 14K for user code) - if it is the 328, 32K (again, 2 K is taken up by the bootloader leaving 30K for user code).

This is the simple answer; it doesn't take into account EEPROM storage space (which is separate and code isn't written into it, nor can code be executed from it, nor can code be stored there to be later moved and run from RAM). You also must realize that the ATMega, like many microcontroller, is a Harvard architecture device, which means that program code and data are completely separate (PROGMEM notwithstanding!).

As far as "lines" that can be held, that isn't easily quantifiable, because the compiler will make many decisions based on the code being compiled, and depending on those decisions (as well as what code is written), the number of "lines" may be different from program to program. You can really only speak of how many bytes can be held by the ATMega, and not "lines of code" (doesn't make any sense anyhow, since the ATMega runs compiled code only; it doesn't interpret lines of code, nor does it use a byte-code "compilation" like a Basic Stamp).

:slight_smile:

30720 bytes. It says in the arduino program lol. Whoops.