I'm out of memory? Is the next thing up the Mega644P?

jerseyguy1996:
Well I've come to the sad realization that my code is just too long for the Mega328. I am positive that part of this is just that I don't code very efficiently (because I don't know what the heck I am doing) but going through all of my variables, even if I put some of the constant data (strings and such) in progmem I am still going to be constrained and it won't allow for any additional features on my program. I'm thinking the Mega644P may be a good next step up since it appears that the good folks at Sanguino have added support for this uC in the arduino IDE. It doubles the amount of flash and sram relative to the 328. It also comes in a fairly reasonably sized package (I don't need something in a massive 100 pin package). Any thoughts on using the 644P as a reasonable next step up from the 328?

I am not sure what you are trying to do but I think better coding would allow you to have all the features you want and keep using the atmega328. Also you only want strings and constant arrays in PROGMEM if it is just one varible you don't want that in PROGMEM. If it turns out that it is impossible to get the code to fit on an atmega328 then I would get something with more flash. Would you be able to post your code? It would help me evaluate if you really need to upgrade or this could be optimized to fit on an atmega328.