In anything and everything…
Microcontrollers or MCUs are self-contained single-chip computers containing CPU and memory for the software and data, as well as many types of peripherals. MCUs come in packages from 6 pins up to more than 100 depending on what kind of functionality is provided. Increasingly high-end MCUs get DSP functionality to accelerate math and signal processing. In many cases individual pins share different functionality controlled by software, including serial communication (UART), I2C, digital input with possible pull-up or pull-down resistors, digital outputs with possible high current drivers, pulse width modulation outputs, analog-to-digital inputs (8 to 12 bits) and digital-to-analog outputs. MCUs also have 1 or more timers for timed events, as well as interrupts for quick reaction to events.
There are many brands of MCUs. Almost all mobile phones use MCUs or CPUs based on the ARM architecture. For device automation it’s more differentiated. Consider that seemingly simple things like coffee machines, washing machines, dish washers, electronic locks, remote controls, oscilloscopes, multi-meters, motor vehicles, stereos, robots, weather stations, etc all use MCUs. The cost can be quite low, down to sub-$. The trend is clearly moving from 8-bit architectures to 16-bit and 32-bit, but 8-bit MCUs are still very popular and arguably dominating.
Here’s a list of top-selling providers.
Arduino is an MCU-based open source platform that’s quickly become very popular among hobbyists, and is also used for semi-professional and small volume commercial solutions. There are clear benefits with Arduino for hobbyists, including:
- Open source design, so anyone can make derivative solutions based on the base schematics
- Piggy-back “shield” boards that add functionality to Arduino boards
- Using Atmel 8-bit MCU chips (so far ATmega168, ATmega328, ATmega1280) that have a scalable architecture suited for high-level languages
- Atmel 8-bit MCUs are generally low-priced and fast (~20 MIPS at 20 MHz; considerably faster than corresponding PIC MCUs)
- Boards available in many different form factors, including very small
- Can be programmed in almost any language, as code is compiled to machine code, but normally Processing (read: C/C++; languages you need to know anyway, if you want to get a job in embedded programming) is used
- Due to the machine code, programs are fast
- A complete IDE is provided; I would though have preferred that it was Eclipse or NetBeans based, and the setup/loop program structure is simply silly and redundant
- There are Atmel chips with the Arduino bootloader pre-installed for a slightly higher price, making it very easy to upload software via USB/serial