How to select a Micro Controller for Particular Application?

DOI : 10.17577/IJERTV6IS040735

Download Full-Text PDF Cite this Publication

Text Only Version

How to select a Micro Controller for Particular Application?

Ashutosh M Bhatt EC Engineering department Government Polytechnic,

Jamnagar, INDIA

AbstractMicro controller is the heart of todays smart or an intelligent device or a system known as an embedded system. The performance, features, specifications of such device or a system depends on the micro controller used. So selecting a micro controller for these systems will be most important point. The selection of micro controller depends upon many different factors

  • criteria. Some major criteria are discussed here in depth with real life examples

    Keywords Micro Controller, Embedded System, Processor, Input-Output, Peripherals, AVR, ARM, FLASH, EEPROM,

    1. INTRODUCTION

      As we know, in any Embedded System Application (ESA) the most important block or component is the micro controller because micro controller is responsible for complete working and operation of the system. Now there are varieties of micro controllers available all with different features and specifications. So how anyone may select one particular micro controller for his application? This is very important point to consider because entire system performance, design, features, specifications etc all depends upon which micro controller is

      used in the system design. So here I am discussing some of the major criteria on the basis of which one may select a particular micro controller that suits with application requirements.

    2. MICROCONTROLLER SELECTION CRITERIA

      1. Based on number of Input-Output (IO) lines

        Probably the first selection criteria for micro controller is, how many input output (IO) lines does it has? The number of different peripheral devices that can be connected to micro controller depends upon how many IO lines it has. Based on how many peripheral and input output devices are required in applications and how many IO lines will be needed, one has to select micro controller. The micro controllers available in market are having minimum 6 to up to 64 IO lines. Some applications require fewer IO lines. For example water level indicator cum controller requires only around 8 to 10 IO lines. On the other hand some applications with many number of peripherals, requires more IO lines. E.g. touch screen LCD based copier machine that requires around 48 IO lines. Please refer Figure 1 for getting better idea.

        Figure 1 Examples of two embedded systems that requires different number of IO lines

      2. Based on required clock speed (speed of operation)

        Any micro controller requires internal or external clock signal for its working and operation. External crystal oscillator or RC oscillator is connected to appropriate pins of micro controller that provides this basic clock signal to it. The instruction execution time is determined by frequency of clock. For example in 8051 series of micro controllers, 12

        MHz (Mega Hertz = 106 Hertz) crystal oscillator gives instruction execution time as 1 uS micro second = 10-6 second) while in AVR (Advance Virtual Risc) ATMega series micro controllers, only 1 MHz crystal oscillator gives 1 uS instruction execution time. Thus operating speed of micro controller directly depends upon crystal frequency.

        The maximum operating speed of micro controller varies from around 12 MHz to 100 MHz.

        So, one has to select the micro controller as per required processing speed for the application. Some applications require high speed operation like high speed data transfer, high speed communication, high speed audio-video encoding/decoding etc all applications requires higher clock speed. While the applications which involves slower devices like displays, printer, motor (low RPM) requires lower operating speed and lower clock.

      3. Based on required processing power or width of DATABUS

        Probably this can be the most important selecting criteria. The width of the data bus of any microcontroller (or even micro processor) decides how much chunk of data it can process in one cycle. If its 8-bit micro controller, it can process only 1 byte in single cycle while if its 32-bit micro controller then it can process 4 bytes simultaneously in single cycle. Means its processing power is 4 times more. It

        can provide more accurate and precise results and also provides high degree of resolution.

        In medium scale or large scale ESA, it is required to have higher degree of precision and accuracy, and high resolution also. So such applications require 32 bit processing power.

        E.g. in smart digital camera, to capture and display original image with high resolution, the internal microcontroller must have 32 bit processing power.

        On the other side, some ESA have simple user interface (keypad, pushbuttons etc), sensor interface, display (7- segment LED or LCD) and actuator control (DC motor, stepper motor, solenoid etc). It does not require that much processing power and high resolution. Such application can be handled by 8-bit micro controller. E.g. in temperature controller or motor controller, there is controlling of temperature or motor as per sensor and user inputs. This can be easily done by 8 bit micro controller. Please refer Figure 2 for getting better idea

        Figure 2 Examples of two embedded systems that requires different processing power

      4. Based on required inbuilt peripherals

        Recent micro controllers are having so many inbuilt peripherals. the common inbuilt peripherals of micro controller are timer/counter, UART/USART (Universal Asynchronous receiver transmitter), ADC (Analog to digital convertor), analog comparator etc while many of the micro controllers have PWM (pulse width modulated) output, SPI (serial peripheral interface) and IIC (inter integrated circuit) communication, DAC (digital to analog converter) watchdog timer, etc advance inbuilt peripherals also. For example AVR ATMega series micro controllers and PIC (peripheral interface controller) 18F series micro controller are having inbuilt ADC, USART, PWM, SPI, IIC, watchdog timer, timer/counter etc all together.

        So before selecting a micro controller one has to first list out which are the peripherals required in his application. If such peripherals are available inbuilt in micro controller then it can reduce the hardware because no need to use external peripheral and this may lead to reduce in size and cost of system. For example in humidity and soil moisture monitoring and controlling application if the micro controller is having built in ADC then sensor analog output can be directly connected to micro controller and it does not require external ADC. The Table 1 shows the inbuilt peripherals of some of the recent, widely used and popular microcontrollers

        Table 1 Comparison of inbuilt peripherals of different popular micro controllers

        Inbuilt Peripherals

        Micro controllers

        AT89C51

        ATMega16

        PIC18F4550

        ARM LPC2148

        UART

        yes

        yes

        yes

        yes

        TIMER/COUNTER

        yes

        yes

        yes

        yes

        PWM

        no

        yes

        yes

        yes

        ADC

        no

        yes

        yes

        yes

        COMPARATOR

        no

        yes

        yes

        no

        DAC

        <>no

        no

        no

        yes

        RTC

        no

        no

        no

        yes

      5. Based on in built memory

        All the micro controller have built in RAM as well as ROM. In ROM also there is program ROM as well as data ROM. Some recent and advance micro controllers have SRAM, FLASH, EEPROM, CASH etc all together. The important criterion to consider is how much amount of inbuilt memory it has. The currently available micro controllers have ROM of 2 KB to up to 1 MB (even more) and RAM of few hundred bytes to up to 4 KB and more. The selection depends upon memory footprint of application code (program).

        The program for any controlling or monitoring application have smaller memory footprint may be 2 to 4 KB. While the program for data manipulation, processing, storing, sorting or the program for high GUI (graphical user interface) with touch screen LCD interface requires large amount of data memory and program memory in terms of 200 to 500 KB. Refer Figure 3 that shows the AVR ATMega series micro controllers of same size but with different amount of internal memory

        Figure 3 Example of two micro controllers of same family with different amount of inbuilt MEMORY

      6. Based on in built communication

        In most of the application it is required that it should communicate with other application or device. Today the world is moving toward IoT (Internet of Things) means everything is connected to internet and controlled by internet. So todays applications should have communication over internet. Also some advance, smart and intelligent applications have wireless connectivity through WI-FI or Bluetooth or through other RF technology. So to provide such kind of communication in the application the micro controller should be selected which has built in communications

        All most all the micro controllers have built in serial communication as UART or USART. But this is not

        enough. The AVR, ARM and PIC families of micro controllers have inbuilt SPI (serial peripheral interface) as well as IIC (inter integrated circuit) communications also. Some advance micro controllers have built in USB interface, Ethernet interface, WIFI interface or Bluetooth interface.

        For example, in real time data logger application, it is required to interface RTC (real time clock) chip and serial memory that both works on IIC protocol. It also requires UART to log (store) the data into computer system. So it will be better if the micro controller is selected with inbuilt IIC interface and UART like AVR, PIC or ARM etc. The Table 2 shows some of the micro controllers with their inbuilt communications.

        Table 2 comparison of inbuilt communication of some recent widely used micro controllers

        Inbuilt communication

        Micro controllers

        ATMega32

        PIC32

        ARM Cortex

        TI CC31/32

        UART/USART

        yes

        yes

        yes

        yes

        SPI

        yes

        yes

        yes

        yes

        IIC

        yes

        yes

        yes

        yes

        USB

        no

        yes

        yes

        yes

        Bluetooth

        no

        no

        no

        yes

        WI-FI

        no

        no

        no

        yes

        Ehernet

        no

        yes

        yes

        no

        CAN

        no

        yes

        yes

        no

      7. Based on software architecture CISC or RISC

        Both RISC (reduced instruction set computer) and CISC (complex instruction set computer) architectures have their own pros and cons. In CISC, one instruction performs 2-3 tasks to gather but it requires more machine cycles also. While in RSIC, one instruction performs only 1 task and takes single machine cycle. In CISC the length of program can be less while in RISC length of program will be more. Also in CISC, there are plenty of instructions so there will be simple program for complex operation while in RISC due to limited instructions, the program can be complex for complex operation. RISC micro controllers are always faster than CISC micro controller in program execution. So one has to select micro controller as RISC or CISC, as per application program complexity. 8051 family of micro controller are CISC while AVR (Advance virtual RISC),

        ARM (Advance RISC machine) and PIC all are RISC micro controllers.

      8. Based on Von Neumann or Harvard architecture

        As we already know, in Von-Neumann architecture there is same memory for code and data (also known as flat memory model) while in Harvard architecture there is separate memory for code (program) and data. Figure 4 illustrates block diagram of both architectures. Also, there are separate bus system for code memory and program memory. So code and data are fetched simultaneously in Harvard and fetched one by one in Von Neumann. So Harvard architecture is comparatively faster than Von-Neumann in program execution. So in ESA design Harvard architecture based micro controllers are preferred

      9. Other factors

        Figure 4 internal architectural block diagram of Harvard and Von Neumann architecture based micro controllers

        1. Power consumption:

          This can be critical criteria for battery operated applications. For any mobile or battery operated application, one must select device with least power consumption. The applications like robot, remote control, wireless sensor etc must have micro controller with lower power consumption otherwise their battery will drain soon this will decrease the life of the battery as well as the life of the device also. The latest micro controllers are having very low power consumption and also many micro controller have power

          down or sleep mode of operation to consume very less power

        2. Voltage ratings:

          Today the micro controllers are available with different voltage ratings like 5 V, 3.3 V, 1.8V etc. The micro controller with less voltage rating requires less power. If in given application, all (or most of) devices (IO and other peripherals) are operating at same voltage say 3.3 v then it is better to select micro controller with 3.3 V voltage rating.

        3. Form factor or size:

          In pocket, handheld, mobile or miniature applications, the size of micro controller plays significant role. In miniature size devices we have to select micro controller which is available in SMD package. Today many micro controllers are available in different packages like DIP, QFP and SMD. For example, some AVR ATMega series micro controllers are available in DIP, QFP and SMD all three packages. So if anyone want to miniaturize the device made up of DIP or QFP package of micro controller, he can made it using SMD package of the same micro controller chip

        4. Cost:

      Last but not the least! If there is a battle between all above selecting criteria, the final winner may be the cost of the micro controller! Because the cost of the chip decides the cost of complete device the final product. And market price of the product depends upon the cost of product. So if anyone wants to limit the price of his microcontroller based product, he has to select cheaper micro controller. However the cost can not be the

      ultimate deciding factor. In critical applications, the specification, accuracy, resolution etc of microcontroller are atmost necessary rather than its cost. For example, in missile guidance system if the micro controller does not have required accuracy and resolution then the missile may not be ble to hit the exact target (bulls eye!) So in this case, the micro controller with higher degree of resolution and accuracy has to be used if at all it is costlier. On the other hand, the micro controller for remote controlled home automation should be cheaper so that the complete home automation system becomes economical and affordable

    3. CONCLUSION

To select a micro controller for one particular application, one has to do long exercise to think on different selecting criteria and finely has to choose one micro controller that satisfies majorities of criteria and suits the application perfectly. It leads to better, accurate and efficient design of an application

Leave a Reply