# How to make a Microcontroller choice?

I would like to find a microcontroller but I don't know how to make a choice!

Currently I know I will need my device to be able to:

• Check the battery level
• Include a timer
• Have at least two interrupts
• Supply 3 devices sometimes with different level power (2 different motors)
• Small
• Low Power
• Have I2C

How can I go about figuring out what microcontroller to use?

-
You can neglect the part about supplying devices: with three output signals, almost every uC is good since you can't in any case drive the load directly. –  clabacchio Mar 30 '12 at 8:04
Dont forget to Check how much the DEV environment costs. I used TI-CC2533 which does all you want.. but you need IAR Embedded for 2.000USD.. Ouch.. –  ppumkin Mar 30 '12 at 10:45
What level of comfort do you have with microcontrollers in general? Have you set up a toolchain from scratch and programmed a board in C before? –  AngryEE Mar 30 '12 at 14:39
The question in your title is acceptable for the site, but your body starts to border line on too localized or brainstorming which is not a good fit for the site. I have made a comment on 2 of the answers addressing this problem as well. –  Kellenjb Mar 30 '12 at 16:14
Thank you, it's not my first project, that's why I am going to try to find a micro controller without a specific board –  Mattew Apr 2 '12 at 4:17
show 1 more comment

There are dozens of microcontrollers that fit that bill. Your choice may depend on some of the following criteria:

• price
• availability, especially if you need them in production quantities and for long-time production. In that case choose a supplier who doesn't often outphase controllers.
• development tools. That's both software and hardware. These days many controllers have on-chip emulation, so that you don't need expensive emulators anymore. Some manufacturers provide a development environment that allows you develop C programs, for others you need third-party tools which may be costly. Many of the more expensive IDEs have a limited version for free or for a small fee. Usually limits the amount of code it can compile, though sometimes the limit can be as high as 32kbytes, which may be more than enough for your needs.
• ease of use. Some microcontrollers are so versatile that it seems they can solve any problem, but have a long learning curve. You don't want to study a 2000 pages user manual to write a "hello world" program.
• good (FAE) support. That will be more important for professionals, distributors don't care about hobbyists.
• package. You will need to find a package that is small enough to fit your needs while being big enough to be able to solder.

Your final choice will depend on how important each of these parameters is for you.

-
@Federico - thanks for the addition. –  stevenvh Mar 30 '12 at 8:42
@FedericoRusso DIL is not always the best, even for an hobbyst. SOIC for instance is still hand-solderable, and may make the job easier in some cases. –  clabacchio Mar 30 '12 at 8:43
@clabacchio: but DIL is easier for breadboarding, either solderless or on veroboard –  Federico Russo Mar 30 '12 at 8:47
@FedericoRusso true :) –  clabacchio Mar 30 '12 at 9:35
@FedericoRusso I don't think the OP wants DIL, that doesn't really fit the "small" requirement he has. Adding package to the list is a good idea, but I have modified it a bit to be a bit more generic. –  Kellenjb Mar 30 '12 at 16:13
show 1 more comment

Given what you've said there are only about a million microcontrollers that would suffice (and that's not an exaggeration). I will be different and recommend the TI MSP430. There's an astoundingly cheap development kit called the MSP430 Launchpad. The most capable microcontroller that can be put on there is the MSP430G2553 (in the DIP package). It's got the I2C interface, I/O, interrupts, etc. It's also very low power. You can buy the dev kit for less than $5 and sample the processor for free. The development tols are free (but probably not for commercial use). I would order it on Digikey, the link is here. Don't worry about the picture on the page. It's incorrect to say the least but that should be the right product. - +1 awesome! so for 4.30 you get all the kit? – clabacchio Mar 30 '12 at 14:56$4.35 actually, plus shipping and handling of course. –  AngryEE Mar 30 '12 at 15:36
the choices for the compilers are IAR or CSS on windows (free with code size limitations) and mspgcc for linux (no limitaion). –  jsolarski Mar 30 '12 at 15:40
mspgcc should be windows as well, but I couldn't get it to work last time I tried. I'm planning to try again soon. –  AngryEE Mar 30 '12 at 15:58
Like I told russ, although your recommendation is reasonable, the answers to this question should be focused on how to make the decision. Product recommendations/shopping questions are not a good fit for our Q/A style and will be closed. To prevent that from happening we have to keep answer quality up. –  Kellenjb Mar 30 '12 at 16:08
show 1 more comment

If this is your first project using a microcontroller use an Arduino and program it in C using free development tools. The controller comes on a board with all the required supporting stuff inc serial communications, regulator.... included ( at 13 - 50 dollars ). When you know more you can apply more complicated criteria.

-
Although your recommendation is reasonable, the answers to this question should be focused on how to make the decision. Product recommendations/shopping questions are not a good fit for our Q/A style and will be closed. To prevent that from happening we have to keep answer quality up. –  Kellenjb Mar 30 '12 at 16:08
Thank you Russ, It's not my first project (the last time I have used Arduino), but the board is really too big ! –  Mattew Apr 2 '12 at 4:13