Microcontroller

Download as pdf or txt
Download as pdf or txt
You are on page 1of 25

Microcontrollers:

Structure, How does it works, Types,


and Applications
What is a Microcontroller
A Microcontroller is a VLSI (Very Large Scale Integration) Integrated
Circuit (IC) that contains electronic computing unit and logic unit
(combined known as CPU), Memory (Program Memory and Data
Memory), I/O Ports (Input / Output Ports) and few other components
integrated on a single chip.
Continue…
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.

The biggest user of Microcontrollers is probably the Automobiles


Industry. Almost every car that comes out of the assembly factory
contains at least one Microcontroller for the purpose of engine control.
You can find many more Microcontrollers for controlling additional
systems.
Continue…
Consumer Electronics is another area which is loaded with
Microcontrollers. Microcontrollers are a part of Digital Cameras, Video
Camcorders, CD and DVD Players, Washing Machines, Ovens, etc.

Microcontrollers are also used in test and measurement equipment like


Multimeters, Oscilloscopes, Function Generators, etc. You can also find
microcontrollers near your desktop computer like Printers, Routers,
Modems, Keyboards, etc.
Basic Structure of a Microcontroller
Continue…
CPU

Central Processing Unit or CPU is the brain of the Microcontroller. It


consists of an Arithmetic Logic Unit (ALU) and a Control Unit (CU). A
CPU reads, decodes and executes instructions to perform Arithmetic,
Logic and Data Transfer operations.

By using a central processing unit, all the microcontroller components


are connected to a particular system. Instruction fetched through the
programmable memory can be decoded through the CPU.
Continue…
Memory

Any Computational System requires two types of Memory: Program


Memory and Data Memory. Program Memory, as the name suggests,
contains the program i.e. the instructions to be executed by the CPU.
Data Memory on the other hand, is required to store temporary data
while executing the instructions.

Usually, Program Memory is a Read Only Memory or ROM and the Data
Memory is a Random Access Memory or RAM. Data Memory is
sometimes called as Read Write Memory (R/W M).
Continue…
Bus

Another important component of a Microcontroller, but rarely


discussed is the System Bus.

A System bus is a group of connecting wire that connect the CPU with
other peripherals like Memory, I/O Ports and other supporting
components.
Continue…
Timers/Counters
One of the important components of a Microcontroller are the Timers
and Counters. They provide the operations of Time Delays and counting
external events. Additionally, Timers and Counters can provide Function
Generation, Pulse Width Modulation, Clock Control, etc.

Serial Port
One of the important requirement of a Microcontroller is to
communicate with other device and peripherals (external). Serial Port
proves a such interface through serial communication. Most common
serial communication implemented in Microcontrollers is UART.
Continue…
Interrupts
A very important feature of a Microcontroller is Interrupts and its
Interrupt Handling Mechanism. Interrupts can be external, internal,
hardware related or software related.

ADC (Analog to Digital Converter)


Analog to Digital Converter or ADC is a circuit that converts Analog
signals to Digital Signals. The ADC Circuit forms the interface between
the external Analog Input devices and the CPU of the Microcontroller.
Almost all sensors are analog devices and the analog data from these
sensors must be converted in to digital data for the CPU to understand.
Continue…
DAC (Digital to Analog Converter)

Digital to Analog Converter or DAC is a circuit, that works in contrast to


an ADC i.e. it converts Digital Signals to Analog Signals. DAC forms the
bridge between the CPU of the Microcontroller and the external analog
devices.

It is usually used for controlling analog devices like DC motors, various


drives, etc.
Types of Microcontrollers
There are different types of Microcontrollers available and are classified
based on Bus-width, Memory, Instruction Set, Architecture, &
Manufacturer.
Microcontrollers come in 8 bit, 16 bit, 32 bit and 64 bit. Some most
advanced microcontrollers have bits more than 64 which are capable of
executing particular functions in the embedded systems.

8 bit microcontroller is capable of executing smaller arithmetic and


logic instructions. Most common 8 bit microcontrollers are atmel 8031
and 8051.

In contrast to 8 bit microcontroller, 16 bit microcontroller executes


program with higher precision and accuracy. Most common 16 bit
microcontroller is 8096.
32 bit microcontroller is applied into automatic control systems and
robotics where high durability and reliability is required. Office
machines and some power and communication systems use 32 bit
controller to execute different instructions.

Based on memory, microcontrollers are divided into two types i.e.


external memory microcontrollers and embedded memory
microcontrollers.
When embedded system needs both microcontroller and external
functioning block that is not incorporated in microcontroller, then
microcontroller is called external memory microcontroller. 8031 is
an example of external memory microcontroller.

When all functioning blocks are incorporated in a single chip that is


connected with embedded system, then microcontroller is called
embedded memory microcontrollers. 8051 is an example of
embedded memory microcontrollers.
CISC (Complex Instruction Set Computer): It is such a design of the CPU
that executes a job using only a single command. The command
contains multi-step operations that program want to execute.
Moreover, CISC machines have relatively smaller programs.

RISC (Reduced Instruction Set Computers: It is such a design of the CPU


that follows simple instructions and is really speedy. Basically, it is a
subset of a number of instructions. In simple words, each command
performs a really simple and small jobs.
Harvard Architecture Microcontroller: It is a type of microcontroller
that has complete instruction in one machine cycle. It has two separate
bus lines and separate memory storage for program code (instructions),
the data, program memory & the data memory respectively. Its cost is
higher due to its complex design.

Von Neumann (or Princeton) Architecture Microcontroller: The point


when a microcontroller has a common memory address for the program
memory and data memory, the microcontroller has Princeton memory
architecture in the processor. It required two machine cycles to
complete an instruction.
Types Of Microcontrollers Based On Manufacturer

8051 Microcontroller (Intel):


Features of 8051 Microcontroller
are-

-8bit microcontroller available in


40 pin DIP
-4Kb on-chip programmable ROM
for storing program code
-128 bytes on-chip RAM for
temporary data storage
-40 pin IC in DIP packaging with 32
pins available for I/O
Continue….

PIC Microcontroller (Peripheral


Interface Controller- Microchip
Technology): Features of PIC
Microcontroller are-
-No internal oscillator
-40 pin IC in DIP packaging with 33
pins available for I/O
-Uses external clock up to 20 MHz as
there is no internal clock
-Smaller instructions set of 35
-Operating voltage ranges from 4.2v
to 5.5v.
Continue….
AVR (Advanced Virtual RISC) Microcontroller: Features of AVR
Microcontroller are-
-Having an internal oscillator of 8MHz
-1Kb on-chip programmable ROM for storing program code
-32Kb on-chip RAM for temporary data storage
-Multiple internal oscillators
-It contains three timers which include two 8-bit timers & one 16-bit timer.

There are many AVR family microcontrollers, such as ATmega8, ATmega16,


and so on. The ATmega328 and ATmega8 are pin-compatible ICs but
functionally they are different. The ATmega328 has a flash memory of
32kB, where the ATmega8 has 8kB. Other differences are extra SRAM and
EEPROM, the addition of pin change interrupts, and timers.
Arduino Uno R3

The Arduino Uno is an open-source microcontroller board that is based


on the microchip ATmega328P (AVR Microcontroller family). It consists
of 6 analog input pins, 14 digital input/output pins (of which 6 are PWM
enabled), a 16 MHz ceramic crystal resonator, a USB-B port, an ICSP
header, a power jack, and a reset button.
Applications of Microcontroller
Nowadays you can find microcontrollers in all types of electronic
devices. Any automobile or other device which measures, controls,
calculates, stores, or displays information must have a microcontroller
chip inside it.

The microcontrollers used widely are in the industries (microcontrollers


widely used for controlling engines and power controls in automobiles).
Various other equipment contains microcontrollers inside it, such as
keyboards, printers, computer mice, modems, and other peripherals.
Continue…
Here are some applications of a microcontroller are follows:

Consumer Electronics Products – Any automatic home appliance like


Robots, Toys, Cameras, Washing machines, Microwave Ovens, etc.

Instrumentation and Process Control – Multimeter, Leakage Current


Tester, Oscilloscopes, Data Acquisition and Control, etc.

Medical Instruments – Medical machines like ECG, Accu-Chek, etc.


Continue…
MultiMedia Application – Mp3 Player, PDAs (personal digital assistant
(PDA), also known as a handheld PC), etc.

Office Machines – Fax machine, Printers, etc.

Automobile – Auto-braking system, Speedometer, etc.

Application of Microcontroller in Day to Day Life Devices:


Light sensing & controlling devices
Temperature sensing and controlling devices
Fire detection & safety devices

You might also like