Program size limitation

Hey fellow arduinians,

I have a couple of projects I can use an arduino (still anxiously waiting for the package [smiley=undecided.gif]). One is simple but the other needs more codes. What is the typical limit of the program size in terms of lines of sketch codes? I know different statements cost memory differently but just an estimate is fine.

A more technical question: is the sketch code compiled and downloaded to arduino or is it interpreted like a BASIC code with the bootloader?

Thanks.

The arduino only runs compiled machine code, so it is quite fast compared to interpreted approaches.

The longest program I've written so far was about 700 lines of code having a compiled size of 9.6k. And that includes communication with a 8-digit 7 segment display and a serial link to a PC and status messages, help text and so on. It is quite easy to run out of RAM though if you're not careful with large arrays. This leads to very strange behavior and hangs, also hard to debug.

As soon as the new Atmega328 is supported by the IDE, this will be remedied a bit. It comes with 2k of RAM and 32k of FLASH, basically the current chip x2.

The bootloader is just for getting the compiled code onto the chip. It is a mini program doing serial I/O with the PC. When it is done, your code runs. The current bootloader takes away about 2k of the FLASH (not RAM). So you're left with about 14k on the current chip.

The bootloader is just for getting the compiled code onto the chip. It is a mini program doing serial I/O with the PC. When it is done, your code runs. The current bootloader takes away about 2k of the RAM. So you're left with about 14k on the current chip.

EEPROM. Program storage space.
Whereas the RAM provides workspace.

Just a slip I'm sure, but lets not add confusion! :wink:

EEPROM. Program storage space.

Actually its flash memory that madworm meant, EEPROM is non-volatile storage for data.

Hrumph!

Sure sure, that's what I wanted to say. No harm done eh ?
Just checking the community :wink:

Quote:
EEPROM. Program storage space.

Actually its flash memory that madworm meant, EEPROM is non-volatile storage for data.

Course it is !! ;D

Thanks for the info. I will not need 700 lines. Just a couple hundard lines is all I need. I don't have long text messages either.