Quote:
How do you choose which family of microcontroller to use?
Purchasing tells you what you can use. Unfortunately I'm not really joking. But given our choice, most of the engineers I work with have a few things they consider important. These are probably the most common, but the order varies by individual:
Peripherals and their suitability for the task
Code efficiency in time and space
Tool chain
Support from the manufacturer / application engineers.
I firmly believe the only reason the 8 bit PICs have done so well is the peripherals and the support. The architecture is just horrible, especially if you use C. If you are using a new chip and the FAE (field application engineers) can't or won't help you when you need it, you aren't likely to go back to that company again. With a lot of recent mergers (Freescale and NXP, soon adding Quallcomm and Microchip and Atmel) we have been bitten hard. Support was the first place they cut costs. The FAEs with the most knowledge and experience were let go and it shows.
Of course, to the bean counters, price is the ONLY thing that matters. The engineers are expected to work magic and run a million line app on a 1K flash, 8 pin micro.
Quote:
How important is the quality of the toolchain?
It's pretty important, but in my experience it isn't much considered until it's too late. If you choose a chip and toolchain that is new to you, it is too late to do anything about it until you get a chance to change architectures later. Which usually means a couple of projects down the road. Where I work, we have now "standardized" on ARM Cortex parts and IAR toolchain. Luckily, the toolchain is good and covers just about anything with an ARM processor. But at around $5000 US per seat, you would expect it to be good.
Quote:
Does the availability of a C compiler make any difference?
Absolutely. In most cases it simply doesn't make sense to write assembly any more. The exception is VERY small applications, like <1K binary. C is semi portable (not as much in embedded work as large systems) and the compiler can almost always write better code than almost any human. A quote I read once was "the compiler doesn't get tired or bored." If you compare the output of a really good compiler to what you wrote, it's hardly recognizable. Modern compilers, the real money ones as well as open source (GCC), are simply amazing.
As much as I like, and like to play with, these old 8 bitters, they simply can't hold a candle to chips designed in modern times. Their architecture dates from a time when transistors were scarce and it's very difficult to have a compiler generate good code for them. The 6502 is probably one of the hardest of the popular ones, beaten only by the 8 bit PICs.
That's my 1/2 cent worth. I'm sure many people will disagree with much of it and I will be interested to see what they have to say.
Will