Do you know how to select the best microcontroller for microcontroller based projects? Selecting the proper microcontroller for a given application is one of the most critical decisions, which controls the success or failure of the task.
There are different types of microcontrollers available and if you have decided on which series is to use, you can easily start your own embedded system design. Engineers must have their own criteria in order to make the right selection.
Here in this article, we shall discuss the basic considerations in selecting a microcontroller.
In many cases, in lieu of having a detailed knowledge about a suitable microcontroller for the project, people often randomly select a microcontroller. This is however a bad idea.
The foremost priority to choose a microcontroller is to have information of the system like block diagram, flowchart, and input/output peripherals.
Here are the top 7 ways which should be followed to ensure the right microcontroller is selected.
Bit selection of microcontroller
The microcontrollers are available in different bit rates like 8-bit, 16-bit and 32-bit rates. The number of bits refers to size of data lines which limit the data. Choosing a best microcontroller for embedded system design in important in terms of bit selection. The performance of the microcontroller increases with the bit size.
8-bit microcontrollers have 8- data lines which can send and receive 8-bit data at a time. It doesn’t have additional functions like read/write; serial communication etc. These are built with less on-chip memories and hence are used for smaller applications. They are available at cheaper cost. However in case your project complexity increases, then go for another higher bit microcontroller.
16-bit controllers have 16-data lines which can send and receive 16-bit data at a time. It doesn’t have any additional functions compared to 32-bit controllers. It is same like 8-bit microcontroller but it is added with few additional features.
The performance of a 16 bit microcontroller is faster than 8-bit controllers and it is cost effective. It is applicable for smaller applications. It is an advanced version of 8-bit microcontrollers.
The 32-bit microcontrollers have 32-data lines which are used to send and receive 32-bit data at a time. The 32- microcontrollers have some additional futures like SPI, I2C, floating point units and process related functions.
The 32-bit microcontrollers are built with maximum range of On-chip memories and hence are used for larger applications. The performance is very fast and cost effective. They are an advanced version of 16-bit microcontrollers.
Family Selection of Microcontroller
There are several vendors manufacturing different architectures of microcontroller. Hence each microcontroller has a unique instruction and register set and no two microcontrollers are similar to each other.
A program or code written for one microcontroller will not run on the other microcontroller. Different microcontroller based projects require different families of microcontrollers.
Different families of microcontrollers are 8051 family, AVR family, ARM family, PIC family and many more.
AVR Family of microcontrollers
An AVR microcontroller accepts instruction size of 16 bits or 2 bytes. It consists of flash memory which contains the 16 bit address. Here the instructions are stored directly.
PIC family of microcontrollers
A PIC microcontroller each instruction accepts 14 bit instruction. The flash memory can store address of 16 bit. If first 7 bits are passed to the flash memory, the remaining bits can be stored later.
However if 8 bits are passed, the remaining 6 bits are wasted. On a light note, this actually depends on the manufacturing vendors.
Thereby selecting a proper family of microcontroller for embedded system design is very important in the process.
Architecture Selection of Microcontroller
The term ‘architecture’ defines a combination of peripherals which are used to perform the tasks. There are two types of microcontroller architecture for microcontroller based projects.
Von Neumann Architecture
The Von Neumann Architecture is also known as Princeton Architecture. In this architecture the CPU communicates with a single data and address bus, to RAM and ROM. CPU fetches the instructions from RAM and ROM simultaneously.
These instructions are executed sequentially through a single bus and hence it takes more time to execute each instruction. Thus we can say that the process of the Von Newman architecture is very slow.
In Harvard architecture, the CPU has two separate bus; those are address bus and data bus to communicate with the RAM and ROM. The CPU fetches and executes the instructions from the RAM and ROM memories through a separate data bus and address bus.Hence it takes lesser time to execute each instruction, making this architecture highly popular.
Thus, for any embedded system design, the best microcontroller is mostly the one with Harvard architecture.
Instruction Set selection of microcontroller
The instruction set is a set of basic instructions like arithmetic, conditional, logical etc that are used to perform basic operations in the microcontroller. Microcontroller architecture works on the basis of instruction set.
For all the microcontroller based projects, microcontrollers based on RISC or CISC instruction set are available.
RISC based architecture
RISC stands for reduced instruction set computer. A RISC instruction set performs all arithmetic, logical, conditional, Boolean operations in one or two instruction cycles. The range of the RISC instruction set is <100.
A RISC based machine executes instructions faster because there is no microcode layer. The RISC architecture contains special load store operations that are used to move the data from internal registers and memory.
A RISC chip is made with lesser number of transistors, hence the cost is low. For any embedded system design, a RISC chip is mostly preferred.
CISC based architecture
CISC stands for complex instruction set computer. The CISC instruction set takes four or more instruction cycles to execute all arithmetic, logical, conditional, Boolean instructions. The range of a CISC instruction set is >150.
A CISC based machine executes the instructions at a slower rate compared to RISC architecture, because here instructions are converted into small code size before being executed.
Memory selection of the microcontroller
The memory selection is very important in choosing the best microcontroller, because the system performance depends on the memories.
Each microcontroller can contain any one type of memories, which are: