Waht are the largest programs for arduino used for ?

I am wondering what are the largest programs people made running on a arduino to control something ?
I've read about a chess program, but not the actual size of it.
If your making something huge please respond, or if you did that in the past, and write the compiled size of your project.
Do some people's project get near the 4K limit of the arduino, i am curious.

A few mild calls to serial, and other libraries and you can be well over 4k. The size is limited to the hardware.

I made an MP3 player with an arduino Mega 1280. That program has a compiled size of 105kB.

As far as I'm aware there isn't a 4K limit? For Uno's it is 30K, for Mega1280 its 126K, for Mega2560, 254k. For the older atmega168 chips it was only 14K.

PGTBOOS:
Do some people's project get near the 4K limit of the arduino, i am curious.

I think you are getting your memory spaces mixed up.

ATmega328 has 32k of program space, 2k or SRAM, and 1k of user-accessible EEPROM.
ATmega2560 has 256k of program space, 8k of SRAM, and 4k of user-accessible EEPROM.

Program code is stored in program space. Variables are stored in RAM. Non-volatile data can be read/write by the running program in EEPROM.

Any project with lots of Strings (like menus for LCDs) will take up large amounts of program space. (And RAM if the programmer is not careful.)

Hi James

I spent the last night, way into the midnight oil, chasing down an issue with my 1280 Mega.
I found if 32k is my magic issue ... I suspect it is my misunderstanding of what it means to have 128k. Kinda embarrassing since I now recall something about this in a datasheet, but I glossed over the fine print :-(.

...
avrdude: Recv: . [10] 
# | 100% 12.22s

avrdude: verifying ...
avrdude: 28796 bytes of flash verified
avrdude: Send: Q [51]   [20] 
avrdude: Recv: . [14] 
avrdude: Recv: . [10] 

avrdude done.  Thank you.

Is ok, and program works are expected.

But, with a longer set of const char strings, the ardude goes past 32k and essentially the Serial seems to stop working. I have 256 x 16 char strings, plus a need for more.

Starting my google search now, but looking for some tips on what's happened to the 128k - 32k ... I am sure 4k is for the bootloader ... and how to move stuff into this "space".

Regards

Steve H

Doh!

I thought I had read the FAQ sticky etc well enough.
I realize I had glossed over most of it.
So I see now that just because avrdude says you use 33132 bytes of flash verified, that's not necessarily easily correlated with the SRAM.

And I see now why running out of it is causing me the snags.

Finally, I see the concept of PROGMEM and new F notation.

Time for some playing to cram the old LCD strings into flash memory.
I guess I had hoped making the char arrays const might give the compiler a hint.

Now to find it there are ways of seeing a memory map of what went where to take the guess work out.

My first WordClock code was written for the ATMega-8 and just fits in the memory when compiled with Arduino IDE v1.0 (about 68 bytes free) but is too big using Arduino IDE v1.0.1 (Who would think an extra .1 on the end would make such a difference :wink: )

I have played with a CW keyer by K3NG that I first found on the Radio Artisan site. Have to choose your options carefully as it can easily be too big for the Arduino.

Another large program that uses the Arduino hardware is the GRBL cnc program. It was compiled using gcc and does not use the Arduino IDE because of size.