How to choose the right Microcontroller for Embedded Systems
NOTE: This article/blog is Copyright TronicsZone. It cannot be reproduced without prior written approval.
Our day to day life is becoming more and more dependent on different Systems which helps us to complete different tasks in our daily routine. The example of those systems are your everyday gadgets like washing machines, television, audio players, kid’s toys and so on. Such systems are called Embedded Systems. An Embedded System can be defined as the electronic/electro-mechanical system which is designed to perform the specific task and is combination of both hardware and firmware. In the embedded system the firmware acts as the soul of the system and hardware acts as the body of the system. But the heart of the embedded system is the Microcontroller. Microcontroller is a computer which is integrated on the single chip consisting of the memory (RAM, ROM), IO ports, Timers, ALU is integrated inside it. Choosing the Microcontroller is one of the crucial tasks in Embedded Systems Design. In this article, we walk through various selection criteria involved in selecting the right microcontroller for an Embedded System.
How to choose Microcontroller?
-
Memory requirement (RAM & ROM)
Memory is the one of the important things in any microcontroller. Memory is divided in to two types that are RAM (Random Access Memory) and ROM (Read Only Memory). In the microcontroller the ROM is used to store the program which is written by the programmer.
Hence selection of ROM is an important factor because the condition may occur where the program size written for an embedded system could end up being higher than the ROM size of a microcontroller. So the ROM should be sufficiently large. In modern days, Flash based microcontrollers are the standard and the ones based on ROM are very rare. RAM is used for the storing the temporary things like variables and generally used as stack memory hence RAM also should be sufficiently large to get good performance.
-
Language support
It is also an important part in the choosing the Microcontroller from the programmers point of view. There are several programming languages like assembly language, C, C++, JAVA etc. Depending on the type of programming language as comfortable to the embedded software developer, the designer should select the proper Microcontroller.
-
Number of IO(Input Output) port
IO ports are used to give the outputs or sense the inputs from the outside world. E.g. being LEDs & buttons. The number of ports decides that how many IO devices can be connect to the Microcontroller. If the application requires many IO devices to connect to the Microcontroller then Microcontroller having more number of ports should be selected else lesser ports should be selected which reduces size of the system.
-
CPU(Central Processing Unit)
CPU is the computational part of the Microcontroller. The main function of the CPU is to run the program which is supplied by the designer. The CPU consist the ALU (Arithmetic and Logical Unit) which is responsible for Arithmetic operations such as Addition, Subtraction, Division, Multiplication and Logical operations like AND OR EX-OR etc. ALU decides how many bits should process at a given time. There are several types of the ALU like 8 bit, 16 bit, 32 bit. Depending upon the operation and application the CPU should be selected.
-
Serial Communication Support
Serial communication enables the Microcontroller to transmit and receive the data serially. To use different serial communication protocol the Microcontroller should support the serial pins like TXD and RXD which form an UART (Universal Synchronous Receiver & Transmitter). Other popular serial communication methods are I2C (inter-IC communication) & SPI (serial peripheral interface). Depending on what kind or peripherals would be used, the designer needs to select the microcontroller with appropriate serial interfaces. Serial communication allows less number of interconnects between the microcontroller & peripherals as the data is exchanged bit by bit instead of word.
-
Timer and Counter unit Support
The Timer unit is generally used to provide certain amount of delay using different timer registers and Timer counts. The timer may support the different operating modes like auto reload mode, split mode. The counter is generally used to count the pulses or used to count the input from the user. In the timer the important part is to select appropriate size of timer register. There are several timer register like 16 bit, 32 bit etc . as the size of the register increase the timer support large value of the delay. Another popular type of timer is called the RTC or real time clock which is used to run a clock/calendar in the user’s program.
-
A/D ( Analogue to Digital Converter) and D/A (Digital to Analogue Converter)
The Microcontroller is a Digital circuit for most part which operates on the digital data. But in many times we required to connect the different analogue module like temperature sensor hence in this case analogue to digital converter is used to convert the analogue output data of the sensor to the digital data on which the Microcontroller can process. Also the digital to analogue converter is used to convert the output of the Microcontroller which is in digital form to the analogue form on which the external module can does it operation.
-
Number of Registers
The registers are used to store some data like memory address, stack data, variable value. As the number of registers increase, the user is able to store more number of the data. Also there are some Special function Register which is generally used in different kind of operations like timers, counters, serial communications.
-
Power Efficiency
Most of the embedded system are operate on the battery hence it is important that it should consume less amount of power. Hence the power efficiency plays vital role while selection the Microcontroller. The Microcontroller should be chosen such that it should consume less amount of power. In such microcontrollers, low power modes like idle, sleep, deep sleep modes are supported.
-
Clock Type
Clock is the used to provide the oscillation to the CPU and other peripherals. It also decides the time requirement for the execution of the instruction. The clock circuit may be internal RC circuit or External Oscillator circuit. The clock decides the instructions execution speed of the Microcontroller. It is preferable to have a microcontroller with a precise in-built oscillator to avoid external oscillator and to minimize EMI/EMC problems.
-
Support of power saving mode
It is the important feature for the battery operated embedded systems. When the system is not in use then Microcontroller should be in sleep mode or power saving to save the power and indirectly save the battery power in battery operated devices.
Conclusion
We have given a brief overview from the above points which help in selecting the right Microcontroller in an Embedded system or a Microcontroller based circuit design. So depending on the system requirements the appropriate Microcontroller IC should be chosen which gives best performance along with good efficiency. TronicsZone is always highly diligent in selecting right microcontroller for the project it works on!
NOTE: This article/blog is Copyright TronicsZone. It cannot be reproduced without prior written approval.