Figure 1. Sketch of peripherals and minimum I/O requirements
Microcontroller architecture
After knowing the hardware and software requirements, the next step is to decide which architecture is more suitable for your project. There are two major architectures for the design of microcontrollers: Von Neumann Architecture and Harvard Architecture. In Von Neumann’s Architecture instructions and data are stored in the same memory and one bus is used to transmit data and instructions. So, it can’t perform data transfer and instruction fetching at the same time. On the other hand, Harvard Architecture has distinct data and instructions stored and also separated buses, so in this architecture, there is no need for scheduling data transitions and instruction fetching.
Memory Requirement
Two critical components of every microcontroller are Flash and RAM. One of the highest priorities is making sure that you don’t run out of program memory space or variable memory space. Engineers can estimate what size of Flash and RAM the project will require, using the software architecture and communication peripherals included in the application. You should always select a microcontroller with a bigger memory space than the estimate calculated. It is easier to start with more memory space, and after, when you are sure that your project won’t need so much memory, move to another chip from the same chip family. Also, you have to take into consideration features that may be added in the next versions.
Data width
Can the application get by with 8-bit or 16-bit microcontrollers, or it requires a larger size like 32-bit or 64-bit microcontrollers? It is very important to select the right bit size – the performance of the microcontroller increases with the increase of the bit size. Today, most application use 32-bit or 16-bit microcontrollers.
Power consumption
Power consumption is an important factor, especially if you have an IoT project that is battery-powered. Check the power consumption in normal mode, but also in low power modes.
Now, when you have lists with all features mentioned above you can start the search for a microcontroller. The best place to start is a microcontroller supplier such as Arrow, Mouser, Future Electronic, or similar. It is easier and better to go with the one you have already used and have good experience with. But this is not the end. Once when you are on the supplier’s webpage, there are also a few things to consider.
Examine cost
Let’s assume that at this moment, you have a few potential candidates for microcontrollers. Now, you can make a list of potential candidates with the order depending on the price with the cheapest in the first place.
Check availability
First, you need to know approximately when you need to have a microcontroller on your desk. Check things like are parts kept in stock at multiple distributors or is there a delivery time in several weeks. The second thing you need to know about availability is the duration of the product life cycle. If your project will have a life cycle of around 15 years, you need to be sure that the manufacturer guarantees that the microcontroller will be available for the next 15 years.
Investigate support for microcontroller
While choosing the microcontroller, check out for community support and available documentation: code samples, examples, reference design, online community, forums, etc. Also, check available software support: vendor-provided HAL, BLE, and Zigbee stack is their support for Zephyr, and also check if the person who will work on it already has experience with that microcontroller.
It is important to select a microcontroller with a good development kit so you can play, research, learn about it as much as you can and start building prototypes until you get the real hardware for your project. It will save you a lot of time and will speed up the process. Also, check the price of the development kit. The last thing is to examine the compiler and the tools that are available such as assembler, debugger, compiler, emulator, etc.
Now you have made a decision, but it should not be set in stone. Build up test circuits and interface them to the microcontroller, and check if high-risk parts are working properly. You may be in a situation where you discovered that the selected microcontroller is not appropriate for your project, but great damage has not been done yet – now you know what component is causing issues, so try to find a similar microcontroller that will have the missing feature.