Hey guys.
I know that was completely open-ended but the basic premise is there. When do you know it's "too much" to fit and move to another device? Common sense says hack and develop on endless resources and then when you go to production, whittle it down to the bare minimum for production runs - but we're not doing things in mass production!
I (and probably everyone not a pro) have a really hard time forecasting what will fit into an Arduino project. I'm used to modern PC development, where that aspect of your design considerations is literally the least of your worries. Storage space is easier, assuming the libraries modules will fit entirely they'll certainly fit after the unused routines are culled. How do you know what will fit in RAM though?
You might know about Oleg and the USB Host shield development, for various things but originally intended for PTP/MTP camera control. I love the idea. So let's just run with that and spitball...
OK so you'll need enough space for the libraries for each thing required for USB Host communication. Then you'll need the strings for manipulating PTP control, all the challenge/response parts that are camera-specific or not part of the library, etc.
Now, say you want to expand it to control a panoramic head while controlling said camera. You'd require at minimum two servos for pan and tilt. That should also be no problem for a '328. But lets say we're talking about a huge $5000 Canon 1Ds Mk IV dSLR with a heavy lens, so we need stepper motors and gearboxes and driver circuitry. Still not that much, right?
Now say you want to expand it; color graphical LCD to show various status, perhaps even a fully duplicated camera LCD, mirroring the info on the camera itself, etc. So more lines - but how to know? I mean does it require a co-processed LCD module/driver that you can talk I2C/SPI to, or does the free SRAM/pins and processor overhead fit into what's left in the 328? Does the I2C/SPI version require more RAM in the 328 than the LCD code? (obviously the H x V x D resolution matters, but for sake of my example, 480 x 360 x 12 bit.)
Now say I want to add a basic UI: a rotary encoder with push button, 6 push button matrix, etc. will /that/ still fit? The string space for text variables, mostly. I assume what leads you to decide between matrix or individual buttons is free pins and cost, respectively, but as routines fill RAM, do you have to pay attention to things like this WRT free mem? Are there ways to compensate, say if you're running out or workable RAM, to pull strings from EEPROMs as needed, or does that code take as much space as the strings themselves?
At this point I'd wonder if it's going to fit into Flash at all and might have to code with a regular development tool and wipe the Arduino bootloader because suddenly that Flash seems needed. And once I start thinking like that, it's one more step to say "chuck it!" and skip Arduino development all together and use a beefier ARM Cortex development board with megs of RAM, speed enough to refresh a high-resolution LCD, GPIO pins and Flash galore, dedicated USB Host/OTG port, huge on-board Flash, etc.
I mean, these days when you can pick up the new SAM9G45 boards with a touch-sensitive LCD already pre-wired for $100-300 running a full OS like CE or linux or android... and still have ~40 GPIO pins free?
Which comes full-circle - price. I cringe at paying $100 for a dev board with an LCD when for another hundred I can get a complete Atom-based netbook, which is basically what these things are without a case. But it seems ludicrously expensive for a non-commercial application.
No, as an Open Source hobby geek I like to start with the $1.00 uC and move up. But I really need to learn how to guesstimate what operates in what amount of RAM.
If you got this far, dang! Thanks for reading, and thanks in advance for any replies.