??? 04/26/07 07:51 Read: times |
#137983 - Less of a problem as time goes on... Responding to: ???'s previous message |
If you're like me, you'll design the hardware, then write the software - but the question is: 'how much code/ram will I need?' So for small run projects (<1000 PA), just shove in a large or largest cpu. For a lot of my stuff i use a ATMEGA128 (sorry 8051!) with 128K flash and 4k ram. I've not run out of code space yet nor ram! Each generation of micros gives us more code, more ram, less cost and a smaller package. Only once you've written the code do you know how big it is! Then you can go smaller if necessary on Rev B. Funnily enough, most of my code sits around 10-20k in size. Still it all comes down to time and money. For a small run project - the design cost predominates, large runs the manufacturing cost dominates. For small run items, it can make sense to build in a little more feature - a bigger micro might have another serial port, so add a RS232 in addition to RS485, or some extra inputs and outputs -things that don't add much to the design time. Even better is when your design is generic enough to be used for other tasks. One design (using a Ds80c320) I did back in '98 is still being used now - the question how many inputs/outputs? answer 24 input and 24outputs - these were done as shift registers and a connector was added to daisy chain if necessary. I put in a slab of flash and ram and some eeprom. I've not run out of resources or cpu performace yet. Everything just seemed to drop into place - the board size was dictated by the connectors and all the ics fitted in nicely - not too squashed so the pcb layout was easy. The bootloader hasn't been touched since the first time it was written and the same library or routines I wrote are still used along with the task switcher and modbus comms library. Over the years we've probably built over 1000 boards and up to Rev D. If only all my projects worked out that way! |