How to choose the right Microcontroller and Microprocessor for your Embedded System projects?

If you know a thing or two about embedded systems, you’ll know the importance of microprocessors and microcontrollers. Have no idea how to pick one that suits your project? We’re here to help! In this article, we will be talking all about the important things you should know when buying your microprocessors and microcontrollers!

How to choose the right Microcontroller and Microprocessor for your Embedded System projects?

Before we can get into the nit and gritty, let’s recap the basics and background of embedded systems, microprocessors and microcontrollers:

What are Embedded Systems?

Ref: Beningo

Embedded system doesn’t just refer to a system, it is a combination of both hardware and software that would allow you to program it. Thus it can be used for a specific function or functions within a larger system. Some popular examples are the Raspberry Pi and Arduino.

Types of Embedded Systems

Ref: guru99

There are 3 main types of Embedded System:

  • Small scale: Designed with 8 or 16-bit microcontroller, able to operate with a battery.
  • Medium scale: Designed with 16 or 32-bit microcontrollers, offers software and hardware complexities. C or Java etc. are used to develop.
  • Sophisticated: Typically has lots of software and hardware complexities, would require processors to do so. Other components or software and hardware may be combined in the latter stage of development.

Basic components in Embedded System

  • Power Supply: It goes without saying that without power, no system will be able to work.
  • Processor: The deciding factor of an embedded system’s performance, ranges from 8-bit to 32-bit.
  • Memory: Consists of Read-only memory (ROM) and Random-access Memory (RAM).
  • Timer: Provides all timing and counting functions, programming can be done to alter this.
  • Communication Ports: Interface that allows the system to communicate with other embedded systems, such as UART, USB, Ethernet etc.
  • Input and Output (I/O): Allows you to drive/interface various devices such as keyboard, mouse and switches etc.

If you would like to learn more about ports, check out this guide! Overview of Computer Ports: Types, Functions and Comparison

What is a Microprocessor?

Ref: Wikipedia

A microprocessor or microprocessing unit (MPU) is a single-chip semiconductor that incorporates the function of a CPU. A 64-bit microprocessor is also called Accelerated Processing Unit (APU), which combines CPU and GPU.

Architecture:

Ref: BCA Study
  • ALU (Arithmetic and Logical Unit): Performs arithmetic and logical operations on the data received from an input device or memory.
  • Registers: Includes registers identified by letters and accumulator.
  • Control: Controls the instructions and flow of data within the device.

What is Microcontroller?

A microcontroller (MCU) is a single integrated circuit (IC) that is made to perform a specific task. Sometimes in higher-end MCUs, a System-on-Chip (SoC) is used instead.

Architecture:

  • CPU (Central Processing Unit): Consists of an Arithmetic Logic Unit (ALU) and a Control Unit (CU)
  • Memory: Consists of Read-only memory (ROM) and Random-access Memory (RAM).
  • I/O Ports: Allows you to drive/interface various devices such as the keyboard, mouse and switches etc.

Key factors to consider when selecting your Microcontroller and Microprocessor

Now that we’ve briefly recap on microprocessor and microcontroller, we can finally move on to the key factors when purchasing! We have listed a few key points you should take note of before making your choice.

Hardware Requirements

Before you even start buying anything, you need to first identify what you need before purchasing anything, the same goes for both microcontroller and microprocessor. You can also consider System-on-chips (SoC) such as STM32F205, nRF52832 and ESP8266 while you’re along the lines of microcontrollers!

For instance, it can be whether do you need UART or Ethernet? How many USB ports do you need? How many input and output do you need? Do you need PWM? Thus, consider making a list as such:

  • I2C
  • SPI
  • UART
  • USB
  • PWM
  • Modbus
  • Digital I/O
  • ADC

Determining what you’ll use your microcontroller or microprocessor for will help you decide which one to get! If you’re interested in SoC such as the nRF52833, do check out my review on Getting Started with nRF52833!

Software Requirements

After you determine your hardware, of course, you’ll need to consider the software portion. For instance, you require a microcontroller or microprocessor that has a strong processing speed and power to support your heavy load projects.

Even if the hardware is up to your standards, but the software is not able to support your projects, it wouldn’t function effectively as well. Thus, researching software platforms will give you an idea on the software framework you’ll need.

With regards to the specific software, we will talk about what are the basic software you would need in the latter part!

The architecture of Microcontroller and Microprocessor

We showed you 2 diagrams on the common architecture of both microcontroller and microprocessor earlier and after you’ve decided on your hardware and software requirements, you can draft out how would your ideal architecture of microcontroller and microprocessor to be.

From there on, you can then look for similar ones that are available on the market. Though there is a variety to choose from, they generally come in 8, 16 and 32-bit.

  • 8-bit: Executing arithmetic and logical operations like addition, subtraction, multiplication division. Such as Intel 8031, 8051, ATtiny85, ATmega328p Microcontrollers.
  • 16-bit: Similar to 8-bit, but able to provide higher accuracy and performance. Such as Intel 8096.
  • 32-bit: Superior processing speed and can handle multiple peripherals. Such as SAMD21G, SAMD21E and SAMD51.

Costing and Power rating

After you have a microcontroller or microprocessor in mind, you can then compare the price tag as well as the power. Though most of the time microcontrollers with a higher price tag is able to support better performance and more complex projects.

Similarly, the power should be considered as this determines whether you’ll run your project on batteries or through connection. And your microcontroller and microprocessor need to support the power ratings. Thus, everything really boils down to what do you actually need.

Memory

It goes without saying that memory is one of the key components in a microcontroller and microprocessor. Here are three different types of memory to consider when choosing:

  • Data memory: On-chip SRAM or external SDRAM etc.
  • Program memory: Flash, OTP, ROM, and ROM etc.
  • Nonvolatile memory: EEPROM or Flash etc.

If you’re interested to learn more about computer memory, do check out my blog on Types of Computer Memory: RAM, ROM and Secondary Memory.


Tips before buying your microcontroller and microprocessor

Once you’ve identified all the key factors and know exactly what kind of microcontrollers or microprocessors you’re looking for, do keep these tips in mind before going straight to payment!

Do your research and compare

Researching and comparing is the key to helping you get the best possible microcontroller or microprocessor for your projects. By doing so, you can also get the best bang for your buck which can help you save more money in the long run!

You don’t necessarily have to go for the price option, always compare your options and focus on what functions you’ll need the most, then you’ll most likely always get something that you won’t regret purchasing.

Check the compatibility and test the functionality

As with hardware and software requirements, the different parts you own may not be always compatible with the microcontroller or microprocessor you’ve decided to purchase.

But in the case where you really want that particular microcontroller or microprocessor but the function is not compatible, you can always upgrade or change the software and replace one IC with another.

Always test the functionality in a test circuit so that it is working smoothly before you move on to develop the rest of your project!

Know your software and simulation tools

We did mention the software requirements earlier, but what exactly should you be aware of? Here are the basic software development tools that you will come across:

  • Assembler (asm): A program that converts written-code into binary.
  • Compiler: A program that translates high-level programming code into low-level programming code that allows the machine to understand.
  • Debugger: A program that is used to test and eliminate bugs, allows programmers to pinpoint the issue and resolve it.
  • Editor: Used to write source code in C and C++ and saves it into a text file.
  • Emulator: Allows programmers to simulate a system and see how the code will work in a real-time environment.
  • Linker: As its name suggests, it links and combines the codes and modules together to form a program.

Also, when you combine these tools above together, you’ll get the Integrated Development Environment (IDE). IDE basically enables you to create source files and their organization into a project, creation of a database for many devices.

These tools would basically help you in the software development process.

Consider Microcontroller kits

If you’re just a beginner and don’t understand all these complicated concepts, don’t fret! There are always starter kits to guide you on this journey. Here at Seeed, we carry Arduino starter kits that would definitely interest you!

Grove Beginner Kit for Arduino ($19.90)

New to microcontrollers? The Grove Beginner Kit for Arduino got your back! This kit is perfect for STEM teaching and beginners who purely want to learn about Arduino and coding, it brings you the simplest way to get started. After you’re more familiar with Arduino, you can also take the modules out, use Grove cables to connect the modules and experiment with other projects!

Features:

  • Arduino UNO compatible board (ATmega320p based Seeeduino Lotus) + 10 most commonly used Arduino modules
  • Compatible with over 300 Grove modules
  • Beginner-friendly! Step by step project tutorials provided.
  • No breadboard and jumper cables required, all modules are pre-wired.

Parts List:

Included in the kit:

  • Grove Beginner Kit For Arduino Board x 1
  • Micro USB Cable x 1
  • Grove Cables x 6

Included on-board:

  • Grove – LED x 1
  • Grove – Buzzer x 1
  • Grove – OLED Display 0.96″ x 1
  • Grove – Button x 1
  • Grove – Rotary Potentiometer x 1
  • Grove – Light x 1
  • Grove – Sound x 1
  • Grove – Temperature & Humidity Sensor x 1
  • Grove – Air Pressure Sensor x 1
  • Grove – 3-Axis Accelerator x 1
  • Seeeduino Lotus x 1

Wio Terminal: ATSAMD51 Core with Realtek RTL8720DN BLE 5.0 & Wi-Fi 2.4G/5G Dev Board ($29.90)

Though the Wio Terminal is not exactly a kit, it is a complete system that equipped with an LCD Screen, Development Board, Input/Output Interface + Enclosure which makes it an efficient and Product-Ready Product if you’re lost and not sure what to get! Similar to the previous kit, Wio Terminal uses Grove too. Seeed also provides documentation and tutorials for beginners!

Features:

  • Powerful MCU: Microchip ATSAMD51P19 with ARM Cortex-M4F core running at 120MHz
  • Reliable Wireless Connectivity: Equipped with Realtek RTL8720DN, dual-band 2.4Ghz / 5Ghz Wi-Fi
  • Highly Integrated Design: 2.4” LCD Screen, IMU and more practical add-ons housed in a compact enclosure with built-in magnets & mounting holes
  • Raspberry Pi 40-pin Compatible GPIO
  • Compatible with over 300 plug&play Grove modules to explore with IoT
  • USB OTG Support
  • Support Arduino, CircuitPython, Micropython, ArduPy, AT Firmware, Visual Studio Code
  • TELEC certificated

Summary

And that’s all on how you should choose your microcontroller and microprocessor for your embedded system projects! We believe no matter whether you’re a veteran or just a beginner, you should be able to pick one that’s suitable for your project’s needs! Hope that this has helped you, and if you’re interested in related content as such, do check out the links down below!

Suggested Readings

Best Arduino Boards and Microcontrollers (MCUs) for IoT and Wearables – For more recommendations on which microcontrollers you should get!

All about CPUs: Microprocessor, Microcontroller and Single Board Computer – Learn more about the differences between microprocessors, microcontrollers and single board computers!

Overview of Computer Ports: Types, Functions and Comparison – If you would like to learn about computer ports and connectors!

About Author

Calendar

December 2020
M T W T F S S
 123456
78910111213
14151617181920
21222324252627
28293031