In the early 70s, two American companies, Intel and Texas Instruments, introduced microprocessors and microcontrollers to the world. These companies envisioned a future that was to be dominated by single-chip integrated computers.

Today, such devices play critical roles in almost all consumer electronic devices, automotive, aerospace, instrumentation, and control systems. Meaning you can find it in every production and nearly every home on the planet. We have become dependent on microcontrollers, yet surprisingly, only a few people really know what a microcontroller is.

In this tutorial, we will attempt to answer that question. We will also give a short overview of the most popular microcontrollers in the market and advances that have been made so far to make working with microcontrollers easy.

The Microcontroller System

To understand what a microcontroller is from the basics, let us first define what a system is. The diagram below illustrates a system as a collection of parts or devices with three features: input, process, and output. A system accepts at least one input, performs some action on that input, and gives out at one or more outputs.

Just like any typical system, a microcontroller system also has inputs, processes, and outputs. The exact number of attributes depends on the project at hand.

For example, a microcontroller system in a car can have many inputs, processes, and outputs compared to a microcontroller system of an electric door controller. The information and outputs of a microcontroller system are voltages that we can use to determine the state of external devices. The process involves reading the voltages from input devices (or controlled environments in the case of feedback systems) and using them to decide on the required output voltages.

A microcontroller is an integrated circuit designed to perform a specific operation in an embedded system. A typical microcontroller includes a processor, memory, and input/output (I/O) peripherals on a single chip. In short, the simplest definition of a microcontroller is an entire computer system on a single integrated circuit chip.

Examples of Devices that can be Controlled by Microcontrollers

Microcontrollers use instructions to determine the state or to control external devices. We find such devices in almost every aspect of our lives, especially applications requiring repetitive operations or high-speed computations. Here are a few examples of devices that microcontrollers can control:

  • Computer
  • computer peripherals
  • telephone systems
  • microwave ovens
  • washers
  • security systems
  • consumer electronic devices
  • sensors.

What is a Development Board

Do you still remember the first time you built a simple circuit on a breadboard or a Veroboard? How was the experience? In most cases, you had to learn how to use the breadboard first and then learn about your circuit. You probably have spent a lot of time building your circuit on the breadboard.

But experienced users find it easy to build circuits on the breadboard. However, when the complexity of the circuit increases, it becomes difficult too to use the breadboard. That’s where development boards come in handy.

Arduino Uno Development Board

In simple terms, development boards or development kits are PCBs with minimum circuitry onboard to enable us to develop and test projects easily and quickly. We can also use development boards to prototype applications in products. The most popular development boards on the market are, without doubt, the Raspberry Pi and the Arduino. Their introduction to the market revolutionized the way people practiced electronics.

Development boards make working with microcontrollers easy in that we have all the circuitry required to program the microcontroller. Adding input and output devices is also straightforward, given that they are at the necessary voltage levels. I like these devices because it has become easier to program the microcontroller, and you can build fantastic programs as a beginner.

In this way, you can focus on the program functionality rather than assembly instruction sets or program debuggers.

Take Arduino, for instance. New learners getting started with microcontrollers find AVR GCC quite intimidating compared with the Arduino programming language. This means that Arduino offers new learners a gentle introduction to the field of microcontrollers, and the learning curve is shallow.

AVR Series Microcontroller Overview

There are so many microcontrollers on the market today, and selecting the suitable microcontroller for your project may be a bit challenging for new designers. Experienced developers have worked with many microcontrollers, and they know the limitations of most of them. There are a lot of factors to consider when selecting a microcontroller. But for me, the first is functionality, ease of programming, cost, and of course, community support.

Ample community support means that you will get lots of help quickly when you get stuck. The tables below summarize some of the factors you may consider when selecting a microcontroller for your project.

Microcontroller
Platform
FeaturesPerformance specificationsProgramming language(s) usedCompilersCommon applications
ATtiny85No. of Pins: 8
8-bit
8K FLASH,
512B RAM,
Family/Series: AVR Tiny
6 IO channels
8KB SRAM
512 Byte EEPROM
8/16 MHz CPU Speed
20MHZ internal clock
2 Timers
ADC
0 Ethernet
Supply Voltage Range:2.7V to 5.5V
Operating Temperature Range:-40°C to +85°C
Arduino (with limitations),
C/C++ or assembly code. (Microchip Studio – formerly AVR Studio), MPLAB X Integrated Development Environment,
Microchip Studio,
IAR Embedded Workbench
AVR GCC,
MPLAB XC8
Safety-critical applications are targeting industrial and automotive products (IEC 61508 and ISO 26262).
Industrial control systems.
SMPS and Power Regulation systems.
Analog signal measuring and manipulations.
ESP8266No. of Pins:30
Digital I/O Pins (DIO): 16
Analog Input Pins (ADC): 1
UARTs: 1
SPIs: 1
I2Cs: 1
Flash Memory: 4 MB
SRAM: 64 KB
Clock Speed: 80 MHz
Operating Voltage: 3.3V
Input Voltage: 7-12V
ArduinoArduino IDEPrototyping of IoT devices,
Low power battery-operated applications,
Network projects,
Projects requiring multiple I/O interfaces with WiFi and Bluetooth functionalities
8051No. of Pins: 40
4KB ROM
128 bytes RAM
Four register banks
128 user-defined software flags
8-bit bidirectional data bus
16-bit unidirectional address bus
32 general-purpose registers each of 8-bit
16-bit Timers
Three internal and two external Interrupts
Four 8-bit ports,
16-bit program counter and data pointer,
full-duplex UART Communication.
Operating Voltage: 5V
Supply Voltage Range:2.5V to 5.5V
Operating Temperature Range:-0°C to +70°C
Assembly,
BASIC, C\C++
CX51 C Compiler,
IAR Embedded Workbench – C/C++ compiler for 8051,
BASCOM-AVR
Energy Management
Touch screens
Automobiles
Medical Devices
Consumer Appliances
Home Applications
Communication Systems
Office
Aeronautical and Space
Medical Equipment
Defense Systems
Robotics
Industrial Process and Flow Control
Radio and Networking Equipment
Remote Sensing
MSP430No. of Pins:
Non-volatile memory (kB): 64
RAM (KB): 2
ADC: 12-bit SAR
GPIO pins (#): 51
Features: AES, DMA, Real-time clock
UART: 2
USB: No
Number of I2Cs: 2
SPI: 4
Comparator channels
Operating voltage: 2.5v – 5.5 v. Active mode: 330 µA at 1 MHz, 3 V.Assembly,
C/C++
TI C/C++compiler,
MSP430 – GCC,
BASCOM-AVR
Factory Control & Automation Applications.
Buildings & Home Automation systems.
Grid Infrastructure & Metering networks.
Portable Test & Measurement Equipment.
Health, Medical & Fitness Applications.
Consumer Electronics.
Teensy 3.2No. of Pins: 34 Pin development board,
32 bit ARM Cortex-M4 72 MHz CPU (M4 = DSP extensions)
256K Flash Memory, 64K RAM, 2K EEPROM
21 High-Resolution Analog Inputs (13 bits usable, 16-bit hardware)
1x 12 bit DAC Analog output
34 Digital I/O Pins (16 shared with analog)
12 PWM outputs
7 Timers for intervals/delays, separate from PWM
USB with dedicated DMA memory transfers
3 UARTs (serial ports)
SPI, 2x I2C, I2S, IR modulator
I2S (for high-quality audio interface)
CAN Bus
Real-Time Clock (with user-added 32.768 crystal and battery)
16 general-purpose DMA channels (separate from USB)
Operating Voltage: 3.3V
Supply Voltage Range:3.6V to 6.0V
Adapted Arduino,
C/C++,
Python
AVR-GCC,
BASCOM-AVR,
MicroPython
32-bit robot/motor control, miniaturized applications, UAVs, sensor networks,
STM32USB 2.0 OTG HS and FS,
Two CAN 2.0B,
One SPI + two SPI or full-duplex I2S,
Three I2C,
Four USART,
Two UART,
SDIO for SD/MMC cards,
Twelve 16-bit timers,
Two 32-bit timers,
Two watchdog timers,
Temperature sensor,
16 or 24 channels into three ADCs,
Two DACs,
51 to 140 GPIOs,
Improved real-time clock (RTC),
Cyclic redundancy check (CRC) engine,
Random number generator (RNG) engine.
Operating Voltage: 3.3V
Supply Voltage Range:1.7V to 3.6V
You can use the following IDEs:
Arm Keil MDK,
PlatformIO IDE,
STM32CubeIDE,
Segger Embedded, Studio,
SW4STM32
Embedded ARM GCC compilerIndustrial:
PLC
Inverters
Printers, scanners
Industrial networking
Building and security:
Alarm systems
Video intercom
HVAC
Low power:
Glucose meters
Power meters
Battery operated applications
Appliances:
Motor drive
Application control
Consumer:
PC peripherals, gaming
Digital camera, GPS platforms
EFM3290 GPIO
ARM Cortex-M3 CPU platform
32 MHz
Up to 128 Flash
Up to 16 kB RAM
180 μA/MHz in Active Mode (EM0)
0.9 μA sleep with RTC and RAM retention
Autonomous peripherals in sleep
USART, I2C, and SPI
-40 °C to +85 °C temperature grade
1.98 V to 3.8 V single power supply
C programmingGNU ARM C Compiler

Single Board Computers

Microcontrollers may not be sufficient for some projects. In that case, you can select from a wide range of single-board computers. Single-board computers are ideal for developers and hobbyists. They are great for use in robotics applications, the Internet of Things, bright house, industrial automation, process control, and human-machine interface. Here is a summary of some of the most popular single-board computers

Raspberry Pi PlatformRAM ProcessorUSBEthernetWiFiBluetoothHDMIOther VideoMicroSD
Raspberry Pi A+512MB700 MHz ARM111 PortYesDSI, CompositeYes
Raspberry Pi B512MB700 MHz ARM114 Ports10/100MbpsYesDSI, CompositeYes
Raspberry Pi 2B1GB900 MHz Quad-Core ARM Cortex-A74 Ports10/100MbpsYesDSI, CompositeYes
Raspberry Pi 3B1GBQuad-Core 64-bit ARM Cortex A534 Ports10/100Mbps802.11n4.1YesDSI, CompositeYes
Raspberry Pi 3B+1GB64-bit ARM Cortex A534 Ports300/Mbps/PoE802.11ac4.2YesDSI, CompositeYes
Raspberry Pi Zero512MB1 GHz single-core ARM111 Micro USBMini-HDMIYes
Raspberry Pi Zero wireless512MB1 GHz single-core ARM111 Micro USB802.11n4.1Mini- HDMIYes
BeagleBone PlatformMemoryProcessorUSBNetworkVideoSupported expansion interfacesMicroSD
PocketBeagle512MB DDR3 (800MHz x 16)AM3358, 1GHz ARM Cortex-A8USB 2.0 480Mbps Host/Client Port, USB 2.0 on expansion headeradd-onsSPI displays3x UART, 4x PWM, 2x SPI, 2x I2C, 8x A/D converter, 2x CAN bus (w/o PHY), 2x quadrature encoder, USBYes
BeagleBone Black512MB DDR3 (800MHz x 16), 4GB on-board storage using eMMCAM3358, 1GHz ARM Cortex-A8USB 2.0 480Mbps Host/Client Port, USB 2.0 Host Port10/100 EthernetmicroHDMI, cape add-ons4x UART, 12x PWM/Timers, 2x SPI, 2x I2C, 7x A/D converter, 2x CAN bus (w/o PHY), LCD, 3x quadrature encoder, SD/MMC, GPMCYes
BeagleBone Blue512MB DDR3 (800MHz x 16), 4GB on-board storage using eMMCAM3358, 1GHz ARM Cortex-A8USB 2.0 480Mbps Host/Client Port, USB 2.0 Host Port2.4GHz WiFi, Bluetooth, BLESPI displays4x UART, 2-cell LiPo, 2x SPI, I2C, 4x A/D converter, CAN bus (w/ PHY), 8x 6V servo motor, 4x DC motor, 4x quadrature encoderYes
BeagleBone AI1GB DDR3 (2x 512Mx16, dual-channel), 16GB on-board storage using eMMCAM5729, 2x ARM Cortex-A15USB 3.0 5Gbps Host/Client Port, USB 2.0 Host PortGigabit Ethernet, 2.4/5GHz WiFi, Bluetooth, BLEmicroHDMI, cape add-ons4x UART, 12x PWM/Timers, 2x SPI, 2x I2C, 7x A/D converter, CAN bus (w/o PHY), LCD, 3x quadrature encoder, SD/MMCYes
BeagleBone Green512MB DDR3 RAM.
4GB 8-bit eMMC on-board flash storage
AM3358 1GHz ARM Cortex-A8 USB 2.0 480Mbps Host/Client Port, USB 2.0 Host Port Ethernet UART, PWM/Timers, SPI, I2C, A/D converter, CAN bus (w/o PHY), LCD, SD/MMC Yes
BeagleBone Green Wireless512MB DDR3 RAM.
4GB 8-bit eMMC onboard flash storage
AM3358 1GHz ARM Cortex-A8 4*USB 2.0 480Mbps Host/Client Port, USB 2.0 Host Port Wi-Fi 802.11 b/g/n 2.4 GHz and Bluetooth 4.1 LE 4x UART, 12x PWM/Timers, 2x SPI, 2x I2C, 7x A/D converter, CAN bus (w/o PHY), LCD, 3x quadrature encoder, SD/MMC Yes
BeagleBoard XM128MB-512MB DDR3 RAM. 8-bit eMMC onboard flash storageAM37x 1GHz ARM Cortex-A8 USB 2.0 480Mbps Host/Client Port, USB 2.0 Host Port EthernetS-Video portUART, PWM/Timers, SPI, I2C, A/D converter, CAN bus (w/o PHY), LCD, SD/MMC Yes

So that’s a brief overview of the most popular platforms on the market today! However, this is not an exhaustive list and only includes some of the most common microcontroller tools. There are still a lot of third-party tools for programming and compiling microcontrollers out there.