What is a Microcontroller?

PS: This post is the continuation of the post INTRODUCTION TO PIC.

A microcontroller is a single chip microcomputer made through VLSI fabrication. A microcontroller also called an embedded controller because the microcontroller and its support circuits are often built into, or embedded in, the devices they control. A microcontroller is available in different word lengths like microprocessors (4bit,8bit,16bit,32bit,64bit and 128-bit microcontrollers are available today).

Microcontroller Chip
Microcontroller Chip

 

1) A microcontroller basically contains one or more following components:

  • Central processing unit(CPU)
  • Random Access Memory)(RAM)
  • Read Only Memory(ROM)
  • Input/output ports
  • Timers and Counters
  • Interrupt Controls
  • Analog to digital converters
  • Digital  analog converters
  • Serial interfacing ports
  • Oscillatory circuits

2) A microcontroller internally consists of all features required for a computing system and functions as a computer without adding any external digital parts in it.

3) Most of the pins in the microcontroller chip can be made programmable by the user.

4) A microcontroller has many bit handling instructions that can be easily understood by the programmer.

5) A microcontroller is capable of handling Boolean functions.

6) Higher speed and performance.

7) On-chip ROM structure in a microcontroller provides better firmware security.

8 ) Easy to design with low cost and small size.

Microcontroller structure

The basic structure and block diagram of a microcontroller is shown in the fig (1.1).

Microcontroller Structure
Microcontroller Structure

Image Taken From

  • CPU

CPU is the brain of a microcontroller. CPU is responsible for fetching the instruction, decodes it, then finally executed. CPU connects every part of a microcontroller into a single system. The primary function of CPU is fetching and decoding instructions. The instruction fetched from program memory must be decoded by the CPU.

  • Memory

The function of memory in a microcontroller is the same as a microprocessor. It is used to store data and program. A microcontroller usually has a certain amount of RAM and ROM (EEPROM, EPROM, etc) or flash memories for storing program source codes.

  • Parallel input/output ports

Parallel input/output ports are mainly used to drive/interface various devices such as LCD’S, LED’S, printers, memories, etc to a microcontroller.

  • Serial ports

Serial ports provide various serial interfaces between a microcontroller and other peripherals like parallel ports.

  • Timers/counters

This is the one of the useful function of a microcontroller. A microcontroller may have more than one timer and counters. The timers and counters provide all timing and counting functions inside the microcontroller. The major operations of this section are performed clock functions, modulations, pulse generations, frequency measuring, making oscillations, etc. This also can be used for counting external pulses.

  • Analog to Digital Converter (ADC)

ADC converters are used for converting the analog signal to digital form. The input signal in this converter should be in analog form (e.g. sensor output) and the output from this unit is in digital form. The digital output can be used for various digital applications (e.g. measurement devices).

  • Digital to Analog Converter (DAC)

DAC perform reversal operation of ADC conversion.DAC converts the digital signal into analog format. It usually used for controlling analog devices like DC motors, various drives, etc.

  • Interrupt control

The interrupt control used for providing interrupt (delay) for a working program. The interrupt may be external (activated by using interrupt pin) or internal (by using interrupt instruction during programming).

  • Special functioning block

Some microcontrollers used only for some special applications (e.g. space systems and robotics) these controllers containing additional ports to perform such special operations. This considered as special functioning block.

Comparison between Microprocessor and Microcontroller

The main comparison between microprocessor and microcontroller shown in fig (1.2)

Comparison of Micrprocessor and Microcontroller
Comparison of Microprocessor and Microcontroller

Source Of Image

Microprocessors                                                                                          Microcontrollers
1 It is only a general purpose computer CPU It is a microcomputer itself
2 Memory, I/O ports, timers, interrupts are not available inside the chip All are integrated inside the microcontroller chip
3 This must have many additional digital components to perform its operation Can function as a microcomputer without any additional components.
4 Systems become bulkier and expensive. Make the system simple, economic and compact
5 Not capable for handling Boolean functions Handling Boolean functions
6 Higher accessing time required Low accessing time
7 Very few pins are programmable Most of the pins are programmable
8 Very few number of bit handling instructions Many bit handling instructions
9 Widely Used in modern PC  and laptops widely in small control systems
E.g. INTEL 8086,INTEL Pentium series INTEL8051,89960,PIC16F877

 

Advantages of Microcontrollers

The main advantages of microcontrollers are given.

a)      Microcontrollers act as a microcomputer without any digital parts.

b)     As the higher integration inside microcontroller reduces cost and size of the system.

c)      Usage of a microcontroller is simple, easy to troubleshoot and system maintaining.

d)     Most of the pins are programmable by the user for performing different functions.

e)      Easily interface additional RAM, ROM,I/O ports.

f)       Low time required for performing operations.

Disadvantages of Microcontrollers

a)      Microcontrollers have got more complex architecture than that of microprocessors.

b)     Only perform a limited number of executions simultaneously.

c)      Mostly used in micro-equipments.

d)     Cannot interface high power devices directly.

Applications

You can find microcontrollers in all kinds of electronic devices these days. Any device that measures, stores, controls, calculates, or displays information must have a microcontroller chip inside. The largest single use for microcontrollers is in the automobile industry (microcontrollers widely used for controlling engines and power controls in automobiles). You can also find microcontrollers inside keyboards, mouse, modems, printers, and other peripherals. In test equipment, microcontrollers make it easy to add features such as the ability to store measurements, to create and store user routines, and to display messages and waveforms. Consumer products that use microcontrollers include digital camcorders, optical players, LCD/LED display units, etc. And these are just a few examples.

Some basic applications of a microcontroller are given below.

a)      Used in biomedical instruments.

b)     Widely used in communication systems.

c)      Used as a peripheral controller in PC.

d)     Used in robotics.

e)      Used in automobile fields.

Articles We Recommend you to read:

1. Basic of PIC

2. INTRODUCTION TO PIC 167F877

3. PIC 16F877 – ARCHITECTURE AND MEMORY ORGANIZATION

4. REGISTER MEMORY ORGANIZATION IN PIC 16F877

 

Author

9 Comments

  1. Identify one microcontroller in terms of its internal function block technical details that makes you to identify it embedded microcontroller or not a general microcontroller..
    Plz help me to find answer for this question.

  2. Jershan A. Devadas

    This website states all about microcontrollers. I got what I need. Thanks to circuitstoday.com.

  3. Zeest Paracha

    Please lead me about micro-controller circuit design and programming for my electronics research paper…. I need it urgently because i have no enough time for my research paper and about its presentation…

  4. Abuyi M. J

    I must so excited for this great Chip which is caperbel of performing Multi functions ranging from Toys to Robotics applications. Bravo to the Manufacturers! I hav checked on the different types of the Microcontrollers, but they are dozens from different Companies. Therefore; I would like to know which one is most suitable for Automotive applications and as well the Configuration of the Pins in many different circuits. Thanks, Hope Ill find my answers.

    • for automotive, any microcontroller is okay. if u r a beginner. go with 8051

  5. Wow, these are all I really looking for… Thank’s to circuitstoday!