Startertutorials Blog
Tutorials and articles related to programming, computer science, technology and others.
Subscribe to Startertutorials.com's YouTube channel for different tutorial and lecture videos.

Categories: Internet of Things. No Comments on Introduction to Microcontrollers
0
(0)

In this article we will look at introduction to microcontrollers. We will learn what is a microcontroller? what are its applications? and more.

 

A Microcontroller is a VLSI (Very Large Scale Integration) Integrated Circuit (IC) that contains:

  • Electronic computing unit and logic unit (together known as CPU)
  • Memory (Program Memory and Data Memory)
  • I/O Ports (Input / Output Ports)
  • Other components

 

All the above components are on a single chip. Sometimes, a Microcontroller is also called as a Computer-on-a-Chip or a Single-Chip-Computer. Since the Microcontroller and its supporting circuitry are often embedded in the device it controls, a Microcontroller is also called as an Embedded Controller.

 

Microcontrollers are omnipresent. If a device or an application involves measuring, storing, calculating, controlling or displaying information, then device contains a microcontroller in it. The earliest known Microprocessors are the Intel’s 4004 and the Texas Instruments’ TMS1000. Since then, the computational power, complexity and power consumption kept on increasing in order to provide ultimate performance.

 


Subscribe to our monthly newsletter. Get notified about latest articles, offers and contests.


For a Microprocessor to work, it needs a bunch of supporting hardware that can be found on a mother board. The hardware includes memory, ICs for peripheral devices, etc. Different applications of microcontrollers are:

  • Household appliances
  • Telecommunications
  • Automobiles
  • Aerospace industry
  • Industrial automation

 

The emphasis is not on the computational power of the Microprocessor but rather on a control mechanism with less complex hardware and increased reliability. This requirement paved way for integrating the minimum hardware required for complete functioning of a Processor on to a single chip i.e. same chip as the processor, to be precise.

 

This is the rise of Microcontrollers, an Integrated Circuit, which contains all the functions and hardware in order to make a complete computer system. Here, the computational power of the device is of less importance than the integration of all the components, including memory. The advantages of a microcontroller are:

  • A Microcontroller is a true device that fits the computer-on-a-chip idea
  • No need for any external interfacing of basic components like Memory, I/O Ports, etc
  • Microcontrollers doesn’t require complex operating systems
  • All the Input/Output Ports are programmable
  • Integration of all the essential components reduces the cost

 

The disadvantages of a microcontroller are:

  • Microcontrollers are not known for their computation power
  • The amount of memory limits the instructions that a microcontroller can execute
  • No operating system and hence, all the instruction must be written

 

General Layout of a Microcontroller

The general layout of a microcontroller is illustrated in the figure below.

Introduction to Microcontrollers - Microcontroller Layout

 

Processor Core

  • The CPU of the controller
  • It contains the arithmetic logic unit, the control unit, and the registers (stack pointer, program counter, accumulator register, register file, . . . )

 

Memory

  • The memory is sometimes split into program memory and data memory
  • In larger controllers, a DMA controller handles data transfers between peripheral components and the memory

 

Interrupt Controller

  • Interrupts are useful for interrupting the normal program flow in case of (important) external or internal events
  • In conjunction with sleep modes, they help to conserve power

 

Timer/Counter

  • Most controllers have at least one and more likely 2-3 Timer/Counters, which can be used to timestamp events, measure intervals, or count events
  • Many controllers also contain PWM (pulse width modulation) outputs, which can be used to drive motors or for safe breaking
  • Furthermore the PWM output can, in conjunction with an external filter, be used to realize a cheap digital/analog converter

 

Digital I/O

  • Parallel digital I/O ports are one of the main features of microcontrollers
  • The number of I/O pins varies from 3-4 to over 90, depending on the controller family and the controller type

 

Analog I/O

  • Apart from a few small controllers, most microcontrollers have integrated analog/digital converters, which differ in the number of channels (2-16) and their resolution (8-12 bits)
  • The analog module also generally features an analog comparator
  • In some cases, the microcontroller includes digital/analog converters

 

Interfaces

  • Controllers generally have at least one serial interface which can be used to download the program and for communication with the development PC in general
  • Since serial interfaces can also be used to communicate with external peripheral devices, most controllers offer several and varied interfaces like SPI and SCI
  • Many microcontrollers also contain integrated bus controllers for the most common (field) busses
  • IIC and CAN controllers lead the field here
  • Larger microcontrollers may also contain PCI,USB, or Ethernet interfaces

 

Watchdog Timer

  • Since safety-critical systems form a major application area of microcontrollers, it is important to guard against errors in the program and/or the hardware
  • The watchdog timer is used to reset the controller in case of software “crashes”

 

Debugging Unit

  • Some controllers are equipped with additional hardware to allow remote debugging of the chip from the PC
  • So there is no need to download special debugging software, which has the distinct advantage that erroneous application code cannot overwrite the debugger

 

The differences between a microprocessor and microcontroller are given below.

Microprocessor Microcontroller
It is only a general purpose computer CPU It is a microcomputer itself
Memory, I/O ports, timers, interrupts are not available inside the chip All are integrated inside the microcontroller chip
This must have many additional digital components to perform its operation Can function as a microcomputer without any additional components.
Systems become bulkier and expensive Make the system simple, economic and compact
Not capable for handling Boolean functions Capable for handling Boolean functions
Higher access time required Low access time
Very few pins are programmable Most of the pins are programmable
Very few number of bit handling instructions   Many bit handling instructions
Widely Used in modern PC  and laptops Widely used in small control systems
Ex: INTEL 8086, INTEL Pentium series Ex: INTEL 8051, 89960, PIC16F877

 

 

List of popular microcontrollers for IoT are as follows:

ATMEL AVRs

  • ATMEGA32 series
  • ATMEGA16 series
  • AVR128 series

Microchip

  • PIC18 series (including PIC12 and PIC16)
  • PIC32 series
  • SAM series

NXP

  • LPC series (ARM Cortex-M0)
  • K32 Series (ARM Cortex-M4/M0)
  • LPC55x Series (ARM CortexM33)
  • MX series (Cortex-M7)

Texas Instruments

  • SimpleLink series (ARM Cortex M4)
  • MSP430 series (MSP432)
  • C2000
  • CC3200/CC3120/CC3220 SERIES (WI-FI ENABLED)

Renesas

  • S1/S3/S5/S7 series

Espressif

  • ESP8266
  • ESP32

Others

  • Intel 8051

 

How useful was this post?

Click on a star to rate it!

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?

Suryateja Pericherla

Suryateja Pericherla, at present is a Research Scholar (full-time Ph.D.) in the Dept. of Computer Science & Systems Engineering at Andhra University, Visakhapatnam. Previously worked as an Associate Professor in the Dept. of CSE at Vishnu Institute of Technology, India.

He has 11+ years of teaching experience and is an individual researcher whose research interests are Cloud Computing, Internet of Things, Computer Security, Network Security and Blockchain.

He is a member of professional societies like IEEE, ACM, CSI and ISCA. He published several research papers which are indexed by SCIE, WoS, Scopus, Springer and others.

Leave a Reply

Your email address will not be published. Required fields are marked *