"There are so many micro-controllers. Which one do I choose?" This is common question within the world of electronics design. Here I list the main contenders and their development tools. I'm trying to give advantages and dis-advantages, but these could be very different for different projects.
I'm also listing the main development boards and which micro-controller they are based upon. Please add comments with your suggestions.
The micro-controller is basically a small computer. It can be programmed with code which will run when the device starts up. The code can be programmed to do virtually anything. Generally the ICs are 8-bit devices (which means they handle the data in 8-bit chunks), but I am listing lots of different types here, 8, 16 and 32 bit.
To give some background - I am working on a project (a battery monitor) which has the following design specifications:
Here I'm listing the main manufacturers of micro-controller along with some details about their ranges of products. This is not an exhaustive list - please post comments about your experiences.
Microchip Technology have been produced billions of PIC microcontrollers. They are used in numerous consumer appliances as the control 'brains'.
Development tools (such a PIC programmers like the PICkit2 and PICkit3) are available at very reasonable cost.
An Integrated Development Environment (IDE), called MPLAB is available free of charge. This is a very powerful environment. MPLAB IDE X has been released which is multi-platform and open source.
A number of C compilers are available. The C18 compiler is free of charge, open source and not limited by code size, but it has reduced optimisation after a 2 week trial period. there are different versions for the different chip families (PIC18, PIC24, PIC32). Cost for the full version of the PIC18 version is $500.
There are three main families which are suitable here:
These are 8-bit devices, but at the top end of the 8-bit device range. They have a 14-bit instruction bus. There are 63 different PIC18 micro-controllers which have >32K program memory, USB connectivity and >512 bytes eeprom.
Some have USB, ethernet, SPI, I2C and CAN bus interfaces built in.
I am familiar with the 18F4550 device (32K program memory, 2K RAM, 256 EEPROM, USB) , costing around £3-5 each.
These are 16-bit microcontrollers. They have a 24-bit instruction bus. They can perform single cycle multiplication (16 x 16 bit). They can support USB on-the-go. 12 Bit ADCs are available built-in.
The dsPIC range has been especially design for digital signal processing.
In the range of £3-£8 each.
These are 32 bit devices. Some have full 10/100 Ethernet connectivity, multiple full speed USB buses, SPI, CAN etc etc. Running up to 80MHz. But they only have 10-bit ADC.
In the range of £5-£10 each.
Atmel has a large range of 8 bit and 32 bit devices. Their products are used in the Arduino development board.
They have an IDE called AVR studio (on version 5.0). Again there are three main 'flavours' that we might be interested in:
8 bit devices. Some of the higher-priced units have USB connectivity.
ATmega328 (used in the Arduino Uno) is around £3-5.
8 and 16 bit devices. Have USB connectivity. 12-bit ADCs used.
Around £6-8 each (for ATXMEGA128 with 128K memory, 8K RAM, USB).
32 bit devices. Apparently the worlds most efficient. with Ethernet, USB, multiple ports etc.
Around £7-12 each (for AT32UC3A0128 - 128K memory, 32K RAM, USB, Ethernet)
(Lady Ada has done a good article on Atmel AVR vs Microchip PIC here answering a lot of questions about these two microcontrollers, she prefers the Atmel AVR)
A range of 8-bit micro-controllers. They do not have USB connectivity built-in. They are designed for efficient multiplication.
Relatively inexpensive at around £1.50-£4 for 128K program 6K RAM device.
These have an ARM Cortex M3 core. They support Ethernet and On-The-Go USB. Has 12-bit ADCs.
Cost is around £6-£10 (STM32F101C6T6 is £6 for 32K program memory, 6K RAM, 10 x 12bit ADC channels)
Their programming and development tools include:
Based upon open source. Two versions - one is full featured and paid for, the other is code size limited (16K) and only supports MSP430 range and TMS320C2800. This is Windows only.
The free version is code size limited to either 4K or 8K (depending upon the device). This is for windows only.
Texas Instruments have a range of micro-controllers. The main ones we might be interested in are:
Based upon the MSP430 microprocessor design. Very low power.
Cost is around £6 for 8K program memory and 512 bytes RAM.
Based upon ARM cortex M3 core. Has multiple serial interfaces. 10bit ADC. Built in temperature monitor.
Around £8 for 64K program, 16K RAM (type: LM3S1133-IQC50-A2)
There are a large number of development tools to help get started with a project. These include:
(Hack-a-day have done a list of development boards and their features here.)
The choice of a micro-controller depends upon many factors.
I have had a play with 3 main devices: PICs, Arduinos (actually I mainly use the Xino - Ardunio clone) and PICAXE.
I found that the Ardunio and the PICAXE were very easy to get started with. If you are a beginner then I would definitely recommend the Ardunio.
But I would not discount any other devices.
For me the main question is about the development tools. I want that to be free and un-limited.
At present I am using PICs when I want USB connectivity, Ardunios when I want to quickly build something and PICAXE when I want very simple (where an Arduino might be over-kill).
I am afraid that, due to the code-limited nature of the ST and TI development tools I am not interested in learning to use something which I cannot scale up without large investment (Take note ST and TI: I think lots of people think in that same way - make your development tools free and unlimited and make money on selling your micro-controllers).
Update 11/4/13: Here is a good article on deciding which microcontroller to use by EDN network.