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?

Sounds reasonable, especially if you have a lot of additional features you want to add. It might be worth posting your code though to see if anyone can suggest ways to save space, even if it just helps you avoid the problem on your new hardware.

Thanks to both of you! Is the Arduino IDE support for the 1284 the same as for the 644?

WildBill, the code is fairly convoluted (as stated before, I don't know what I am doing), but I have posted it up on Github (mainly as a back up for me in case my macbook craps out). It would be great if you would care to work your way through it to see if there are any major savings to be had. Memory wise I am fine until I add the SD library. I know there are some trimmed down versions but it would still be close and I would just like a bigger pool to swim in so that I can add more features.

Oy......who's right? Simpson_jr says yes and Oric_dan says maybe if I am willing to do some extra stuff. I guess either way it can work....it may just not be a turn key solution. I'll pick up the PDIP version of the 644 and 1284 and breadboard it. Maybe it will work out of the box and if not perhaps it presents a good learning experience for me on some of the behind the scenes stuff in the libraries. Thanks guys!

However, in w500.h in the standard Ethernet library in the very latest version of the IDE, it still says

Quote

#if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__)

so your Ethernet board won't work with 1284 chips.

The point is, 1284 support has only recently been started to be included in the IDE*AT ALL*, and still hasn't been completely wrung out. The reason I know this is because I've had to fix these things myself to get my 1284 boards to work.

If you really want an education, go read some of those interminable threads, where peoplewere scratching their heads for weeks, trying to get this stuff to work,http://forum.arduino.cc/index.php?topic=139671.0http://forum.arduino.cc/index.php/topic,146773.msg1102743.htmlhttp://forum.arduino.cc/index.php/topic,144165.msg1082609.htmlhttp://forum.arduino.cc/index.php?topic=80483.0http://forum.arduino.cc/index.php/topic,109550.msg822612.html

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.

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.

You can figure it out for yourself. Look in the libraries and various include files.......

If you really want education, go read some of those interminable threads, where peoplewere scratching their heads for weeks, trying to get this stuff to work,http://forum.arduino.cc/index.php?topic=139671.0http://forum.arduino.cc/index.php/topic,146773.msg1102743.htmlhttp://forum.arduino.cc/index.php/topic,144165.msg1082609.htmlhttp://forum.arduino.cc/index.php?topic=80483.0http://forum.arduino.cc/index.php/topic,109550.msg822612.html

Well I've come to the sad realization that my code is just too long for the Mega328.

From your comment about code length I guess you're talking about program memory. How much is your sketch taking currently? You've only got a few hundred lines of code there so I wouldn't have thought that your own code would be using up a lot of it and probably the libraries you're using are responsible for most of it.

By the way, your implementation of timer() does not handler millis() overflow correctly. To handle overflow, you can code it like this:

You can figure it out for yourself. Look in the libraries and various include files.......

If you really want education, go read some of those interminable threads, where peoplewere scratching their heads for weeks, trying to get this stuff to work,http://forum.arduino.cc/index.php?topic=139671.0http://forum.arduino.cc/index.php/topic,146773.msg1102743.htmlhttp://forum.arduino.cc/index.php/topic,144165.msg1082609.htmlhttp://forum.arduino.cc/index.php?topic=80483.0http://forum.arduino.cc/index.php/topic,109550.msg822612.html

This is fantastic information! Thanks!

I also wrote up a page discussing my fixes and experiences,http://www.ot-hobbies.com/resource/ard-1284.htm