328p -> 1280 or ARM?

I'm running out of code space on my 328p. The project requires being able to go into a "deep sleep" mode with uA consumption levels, and general energy efficiency. I've built a custom board that accepts a ProMini, and my project is all arduino + libraries.

Switching away from the pro mini is going require some expensive changes no matter which way I go, so I'd like to only do it once. I have some (limited) experience coding for the Cortex M3, so one alternative is to use the Maple Mini, but I'd imagine I would have to rewrite a lot of the third party libs I'm using (specifically - servo control, i2c, Fat32 system for writing to an SD card and a few others)

Is the 1280 (or 2560) energy efficient enough to compete with the arm chip / be comparable to the 328?

I'm running out of code space on my 328p

If your running low on code space then you have probably done something wrong. Post a 300 or 400 line sample and we can take a look. On a micro such as these AVRs 32k is about a 1000 man hours work!.

Is the 1280 (or 2560) energy efficient enough to compete with the arm chip / be comparable to the 328?

Every thing you need to work this out is in the data sheet of the chip(s) you want to use. Only you can define what you mean by "compete".

that's not really an answer.

feel free to take a look at the code, but as i mentioned in the original post, most of the weight is coming from libraries i need.

Is the 1280 (or 2560) energy efficient enough to compete with the arm chip / be comparable to the 328?

Yes. But you won't have the many small premade and sold module packaged options to use like the Pro-mini or Nano package to use. You might want to look at the Tensey 3.1 board as it's ARM based, very small and has software libraries and arduino IDE support files to work under the IDE.

https://www.pjrc.com/teensy/

awesome, thanks.

not too worried about premade modules (i'm making custom SMT boards anyway), but like the support of this being out there for a while.

'1284P is another option. 128K: 4x the Flash memory of ther '328P.
16K: 8x the SRAM (and twice that of the '2560).
Same great low power consumption in sleep mode with the 8-bit processor.
Easy to go SMD with - one of my very first PCB designs here in the forum:
1284P, FTDI, RS485, RS232, SD card, dual SPI UART for even more IO:
http://www.crossroadsfencing.com/BobuinoRev17/
for more examples

Space wise I can't see that much waste. You could shorten all those print(F( long debug string)) you would save some but not alot.

As you are not using any motors or a motor shield there is no need to use software servo you can just use servo. (This may save some space) worth a try.

As your not taking input from from serial you can drop the use of software serial and use the RX side of serial for the GPS.

There a few other problems in the design which I think will give you problems later such as the use of all those delays and sleeps.

The only thing in the code which would need a change if you where to move to a mega is the use of software serial.

Mark

the RX trick will break my ability to program via the uart, so that won't work.

what do you mean by software servo? i don't see anything about that. also - there is no print(F(..)) in my code, maybe the libraries. Getting rid of all Serial.XX calls saves ~900 bytes.

also - what other problems do you see, and why is using delay/sleep an issue?

the RX trick will break my ability to program via the uart, so that won't work.

If you look at (for example) the Wireless/SD shield (its in the products section) use a micro switch to over come just that problem.

The single most common technical answer to programming problems in the the programming section is "Don't use delay, see blink with out delay look at Fine State machines (in the palyground)" I think PaulS has his stock version on a short cut key.

Mark

can you give an example of problems that delay causes, beyond "lots of problems?"

is it an issue of not letting the outer loop run and process some sort of system events? ISRs not running? Serial buffer not filling?