Should i switch to Arduino Mega ?

I’m facing some troubles related with something i did not anticipate:

Program Size !

Arduino Uno Flash Memory is smaaalll !

As you may know, the ATmega328p use a “Harvard architecture”. This mean that program memory is separated from data memory.

Concerning the data memory, i already knew that the 2k bytes available on the Arduino Uno platform were not going to be enough for this project. That’s was why i anticipated that, and investigate a solution based upon the 23k256 chip (see this post).

But what i did not anticipated is that the program memory was also going to be too small. The Flash memory that contain program run by the Arduino Uno is 32k bytes:

  • 5k bytes are already used by the Arduino boot loader.
  • Linking and using the avr-libc + the Arduino Core Library also consume several kilo bytes
  • Linking and using the SPI + MIDI library + SPIRAM library + LiquidCrystal Library also consume several kilo bytes

The only thing, is that now, after writing some code for the MIDILooper itself, i only have less than 6k bytes available for all the rest of the code

I can’t be sure for  now, but it may not be enough to store the entire program…

There is no way to extend the Flash memory, so i may switch from Arduino Uno to Arduino Mega, which contain 512k bytes of program memory…

Leave a comment