SRAM & Flash on Mega

I have a standard Arduino Mega, purchased a few months ago, and I was just curious about the space that should be available on this device. From the Arduino Mega page:

Flash Memory 128 KB of which 4 KB used by bootloader SRAM 8 KB

However, my device, when I compile it, gives me the following:

Binary sketch size: 23,794 bytes (of a 258,048 byte maximum, 9.22%). Estimated memory use: 1,790 bytes (of a 8,196 byte maximum, 21.84%).

The SRAM space is on par (with 4 extra bytes for some reason), but the Flash space is 4 bytes short of 256kb (the 4 bytes makes sense, being used for the bootloader). Is there a reason my device has double the available Flash? Was this a later revision of the Mega2560?

2560 Mega has 256K (256 * 1024 = 262,144) 1280 Mega has 128K (128 * 1024 = 131,072) Boot sizes are shown in words (2 bytes/word). Options for both are 512, 1024, 2048, 4096 words. (1024, 2048, 4096, 8196 bytes) Which do you have? Look at the chip.

Microcontroller ATmega1280
Operating Voltage 5V
Input Voltage (recommended) 7-12V
Input Voltage (limits) 6-20V
Digital I/O Pins 54 (of which 15 provide PWM output)
Analog Input Pins 16
DC Current per I/O Pin 40 mA
DC Current for 3.3V Pin 50 mA
Flash Memory 128 KB of which 4 KB used by bootloader
Clock Speed 16 MHz

Damn reading is hard, my bad

*I have the 2560 :slight_smile:

Which IDE are you using that gives you those estimates?

Sublime Text 2 with the Stino (for Arduino) package.

Those numbers all look valid (or max limits) for the 5V regulator and the IO of the chip. Flash size is as previously noted for the 2560. EEPROM & SRAM are the same for 1280/2560.

The point would seem to be - if the chip variants (1280/ 2560) are available at virtually the same price - and whilst this might not have been the case initially, greater demand for the more capable chip will usually cause its price to drop to the same or less than the lesser capable - and there is no performance (power draw being the only relevant criterion) penalty to the more capable version, why would anyone other than a bulk consumer (in far greater bulk than the Arduino enterprise who might then be offered a different pricing table) bother to offer (manufacture and stock) an unnecessary inferior option at the same price?

This is illustrated in the reference to "past and present Arduino boards" on the Hardware Index page. The Mega(1280) no longer appears on the Products page so any "standard" Mega purchased recently must necessarily be a 2560. :)

1280 $16.13 2560 $17.97

Both still available. Have to ask Atmel why they offer both. Likely that 1280s are 2560s that failed memory screenings & are remapped to still be sellable.

I have a related question. My uno is suposed to have 2K of memory, but when compiling in Stino/Sublime text i get these estimates:

Binary sketch size: 11,108 bytes (of a 32,256 byte maximum, 34.44%).
Estimated memory use: 943 bytes (of a 1,024 byte maximum, 92.09%).

Just curious, why doesn’t it say “943 bytes of (2,048 byte maximum”?

Not familiar with Stino/Sublime, the SRAM max does look low tho. Almost like '328 flash size & 168 SRAM size, or maybe EEPROM size.