Micro Controller
Prepared By
 Saad Ahmed Akash (Roll-05)
 Abul Hasan Md Osama (Roll-09)
 Md. Al-Zihad (Roll-35)
Prepared For
M. Tawfiqul Islam
Dept. Of Computer Science & Engineering,
University of Dhaka. 6/7/2016Dept of CSE, University of Dhaka 1
What is Microcontroller
 A microcontroller is a small computer (SoC) on a
single integrated circuit containing a processor
core, memory, and programmable input/output
peripherals.
 Program memory in the form of Ferroelectric
RAM, NOR flash or OTP ROM is also often included
on chip, as well as a typically small amount of
RAM.
6/7/2016Dept of CSE, University of Dhaka 2
What is Microcontroller
 Microcontrollers are designed for embedded
applications, in contrast to the microprocessors
used in computers or other general purpose
applications consisting of various discrete chips.
 Another name for a microcontroller, therefore, is
"embedded controller."
6/7/2016Dept of CSE, University of Dhaka 3
Properties
 Microcontrollers are "embedded" inside some
other device (often a consumer product) so that
they can control the features or actions of the
product.
 Microcontrollers are dedicated to one task and
run one specific program. The program is stored
in ROM (read-only memory) and generally does
not change.
6/7/2016Dept of CSE, University of Dhaka 4
Properties
 Microcontrollers are often low-power devices.
A desktop computer is almost always plugged
into a wall socket and might consume 50 watts
of electricity. A battery-operated
microcontroller might consume 50 milliwatts.
6/7/2016Dept of CSE, University of Dhaka 5
Microcontroller v/s microprocessor
 Microprocessors are used to execute big and
generic applications, while a microcontroller will
only be used to execute a single task within one
application.
 Comparing microcontroller and
microprocessor in terms of cost is not justified.
6/7/2016Dept of CSE, University of Dhaka 6
Microcontroller v/s microprocessor
 Undoubtedly a microcontroller is far cheaper
than a microprocessor.
 However microcontroller cannot be used in place
of microprocessor and using a microprocessor is
not advised in place of a microcontroller as it
makes the application quite costly.
6/7/2016Dept of CSE, University of Dhaka 7
Microcontroller v/s microprocessor
 Microprocessor cannot be used stand alone.
 They need other peripherals like RAM, ROM,
buffer, I/O ports etc and hence a system
designed around a microprocessor is quite
costly.
6/7/2016Dept of CSE, University of Dhaka 8
Uses & Applications
 Microcontrollers are used in automatically
controlled products and devices
6/7/2016Dept of CSE, University of Dhaka 9
• such as automobile engine control systems,
• Implantable medical devices,
• Remote controls,
• Office machines, appliances, power tools, toys and
other embedded systems.
Uses & Applications
 microcontrollers make digital control in an
economical way.
6/7/2016Dept of CSE, University of Dhaka 10
• By reducing the size and
• By reducing cost compared to a design that uses
a separate microprocessor, memory, and
input/output devices,
History
 The first microprocessor was the 4-bit Intel
4004 released in 1971, with the Intel 8008 and other
more capable microprocessors becoming available
over the next several years.
 However, both processors required external chips to
implement a working system, raising total system
cost, and making it impossible to economically
computerize appliances.
6/7/2016Dept of CSE, University of Dhaka 11
Interrupts
 Microcontrollers must provide real-time response
to events in the embedded system they are
controlling.
 When certain events occur, an interrupt system
can signal the processor to suspend processing the
current instruction sequence and to begin
an interrupt service routine (ISR, or "interrupt
handler") which will perform any processing
required based on the source of the interrupt.
6/7/2016Dept of CSE, University of Dhaka 12
Interrupts
 Possible interrupt sources are device dependent,
and often include events such as :
6/7/2016Dept of CSE, University of Dhaka 13
• an internal timer overflow,
• completing an analog to digital conversion,
• a logic level change on an input such as from a button being
pressed, and data received on a communication link.
Programming environments
 Microcontrollers were originally programmed only
in assembly language, but various high-level
programming languages are now also in common
use to target microcontrollers.
 These languages are either designed specially for
the purpose, or versions of general purpose
languages such as the C programming language.
6/7/2016Dept of CSE, University of Dhaka 14
How does it work?
 Microcontroller has an input device in order to get
the input and an output device (such as LED
or LCD Display) to exhibit the final process.
 For example, The Television has a remote control
as an Input device and the TV screen as the
output device. The signal sent from the remote
control is captured by the microcontroller.
6/7/2016Dept of CSE, University of Dhaka 15
How does it work?
 The microcontroller controls the channel
selection, the amplifier system and picture tube
adjustments such as hue, brightness, contrast etc.
 The architecture of a microcontroller depends on
the application it is built for.
 For example, some designs include usage of
more than one RAM, ROM and I/O functionality
integrated into the package.
6/7/2016Dept of CSE, University of Dhaka 16
Simulators
 Simulators are available for some microcontrollers.
 These allow a developer to analyze what the
behavior of the microcontroller and their program
should be if they were using the actual part.
 A simulator will show the internal processor state
and also that of the outputs, as well as allowing
input signals to be generated.
6/7/2016Dept of CSE, University of Dhaka 17
General Architecture
6/7/2016Dept of CSE, University of Dhaka 18
General Architecture
 The architecture of a typical microcontroller is complex
and may include the following:
 A CPU, ranging from simple 4-bit to complex 64-bit
processers.
 Peripherals such as timers and event counters.
 RAM (volatile memory) for data storage. The data is
stored in the form of registers, and the general-purpose
registers store information that interacts with the
arithmetic logical unit (ALU).
6/7/2016Dept of CSE, University of Dhaka 19
General Architecture
 ROM, EPROM, EEPROM or flash memory for program and
operating parameter storage.
 Programming capabilities.
 Serial input/output such as serial ports.
 A clock generator for resonator, quartz timing crystal or
RC circuit.
 Analog-to-digital convertors.
 Serial ports.
 Data bus to carry information.
6/7/2016Dept of CSE, University of Dhaka 20
Common Microcontrollers
 Altera
 Atmel
 EPSON
 ELAN
 Fujitsu
 Infineon
 Intel
6/7/2016Dept of CSE, University of Dhaka 21
Common Microcontrollers
 Panasonic
 Parallax
 Rockwell
 Sony
 Spansion
 Toshiba
 XMOS
6/7/2016Dept of CSE, University of Dhaka 22
Common Microcontrollers
6/7/2016Dept of CSE, University of Dhaka 23
Common Microcontrollers
6/7/2016Dept of CSE, University of Dhaka 24
Common Microcontrollers
6/7/2016Dept of CSE, University of Dhaka 25
Common Microcontrollers
6/7/2016Dept of CSE, University of Dhaka 26
Common Microcontrollers
6/7/2016Dept of CSE, University of Dhaka 27
Common Microcontrollers
6/7/2016Dept of CSE, University of Dhaka 28
Benefits of microcontrollers
 Cost advantage: The biggest advantage
of microcontrollers against larger
microprocessors is that the design and hardware
costs are much lesser and can be kept to a
minimum.
 A microcontroller is cheap to replace, while
microprocessors are ten times more expensive.
6/7/2016Dept of CSE, University of Dhaka 29
Benefits of microcontrollers
 Lesser power usage: Microcontrollers are
generally built using a technology known as
Complementary Metal Oxide Semiconductor
(CMOS).
 This technology is a competent fabrication system
that uses less power and is more immune to
power spikes than other techniques.
6/7/2016Dept of CSE, University of Dhaka 30
Benefits of microcontrollers
 All-in-one: A microcontroller usually comprises of
a CPU, ROM, RAM and I/O ports, built within it to
execute a single and dedicated task.
 On the other hand, a microprocessor generally
does not have a RAM, ROM or IO pins and
generally uses its pins as a bus to interface to
peripherals such as RAM, ROM, serial ports, digital
and analog IO
6/7/2016Dept of CSE, University of Dhaka 31
Thanks
6/7/2016Dept of CSE, University of Dhaka 32

Microcontroller

  • 1.
    Micro Controller Prepared By Saad Ahmed Akash (Roll-05)  Abul Hasan Md Osama (Roll-09)  Md. Al-Zihad (Roll-35) Prepared For M. Tawfiqul Islam Dept. Of Computer Science & Engineering, University of Dhaka. 6/7/2016Dept of CSE, University of Dhaka 1
  • 2.
    What is Microcontroller A microcontroller is a small computer (SoC) on a single integrated circuit containing a processor core, memory, and programmable input/output peripherals.  Program memory in the form of Ferroelectric RAM, NOR flash or OTP ROM is also often included on chip, as well as a typically small amount of RAM. 6/7/2016Dept of CSE, University of Dhaka 2
  • 3.
    What is Microcontroller Microcontrollers are designed for embedded applications, in contrast to the microprocessors used in computers or other general purpose applications consisting of various discrete chips.  Another name for a microcontroller, therefore, is "embedded controller." 6/7/2016Dept of CSE, University of Dhaka 3
  • 4.
    Properties  Microcontrollers are"embedded" inside some other device (often a consumer product) so that they can control the features or actions of the product.  Microcontrollers are dedicated to one task and run one specific program. The program is stored in ROM (read-only memory) and generally does not change. 6/7/2016Dept of CSE, University of Dhaka 4
  • 5.
    Properties  Microcontrollers areoften low-power devices. A desktop computer is almost always plugged into a wall socket and might consume 50 watts of electricity. A battery-operated microcontroller might consume 50 milliwatts. 6/7/2016Dept of CSE, University of Dhaka 5
  • 6.
    Microcontroller v/s microprocessor Microprocessors are used to execute big and generic applications, while a microcontroller will only be used to execute a single task within one application.  Comparing microcontroller and microprocessor in terms of cost is not justified. 6/7/2016Dept of CSE, University of Dhaka 6
  • 7.
    Microcontroller v/s microprocessor Undoubtedly a microcontroller is far cheaper than a microprocessor.  However microcontroller cannot be used in place of microprocessor and using a microprocessor is not advised in place of a microcontroller as it makes the application quite costly. 6/7/2016Dept of CSE, University of Dhaka 7
  • 8.
    Microcontroller v/s microprocessor Microprocessor cannot be used stand alone.  They need other peripherals like RAM, ROM, buffer, I/O ports etc and hence a system designed around a microprocessor is quite costly. 6/7/2016Dept of CSE, University of Dhaka 8
  • 9.
    Uses & Applications Microcontrollers are used in automatically controlled products and devices 6/7/2016Dept of CSE, University of Dhaka 9 • such as automobile engine control systems, • Implantable medical devices, • Remote controls, • Office machines, appliances, power tools, toys and other embedded systems.
  • 10.
    Uses & Applications microcontrollers make digital control in an economical way. 6/7/2016Dept of CSE, University of Dhaka 10 • By reducing the size and • By reducing cost compared to a design that uses a separate microprocessor, memory, and input/output devices,
  • 11.
    History  The firstmicroprocessor was the 4-bit Intel 4004 released in 1971, with the Intel 8008 and other more capable microprocessors becoming available over the next several years.  However, both processors required external chips to implement a working system, raising total system cost, and making it impossible to economically computerize appliances. 6/7/2016Dept of CSE, University of Dhaka 11
  • 12.
    Interrupts  Microcontrollers mustprovide real-time response to events in the embedded system they are controlling.  When certain events occur, an interrupt system can signal the processor to suspend processing the current instruction sequence and to begin an interrupt service routine (ISR, or "interrupt handler") which will perform any processing required based on the source of the interrupt. 6/7/2016Dept of CSE, University of Dhaka 12
  • 13.
    Interrupts  Possible interruptsources are device dependent, and often include events such as : 6/7/2016Dept of CSE, University of Dhaka 13 • an internal timer overflow, • completing an analog to digital conversion, • a logic level change on an input such as from a button being pressed, and data received on a communication link.
  • 14.
    Programming environments  Microcontrollerswere originally programmed only in assembly language, but various high-level programming languages are now also in common use to target microcontrollers.  These languages are either designed specially for the purpose, or versions of general purpose languages such as the C programming language. 6/7/2016Dept of CSE, University of Dhaka 14
  • 15.
    How does itwork?  Microcontroller has an input device in order to get the input and an output device (such as LED or LCD Display) to exhibit the final process.  For example, The Television has a remote control as an Input device and the TV screen as the output device. The signal sent from the remote control is captured by the microcontroller. 6/7/2016Dept of CSE, University of Dhaka 15
  • 16.
    How does itwork?  The microcontroller controls the channel selection, the amplifier system and picture tube adjustments such as hue, brightness, contrast etc.  The architecture of a microcontroller depends on the application it is built for.  For example, some designs include usage of more than one RAM, ROM and I/O functionality integrated into the package. 6/7/2016Dept of CSE, University of Dhaka 16
  • 17.
    Simulators  Simulators areavailable for some microcontrollers.  These allow a developer to analyze what the behavior of the microcontroller and their program should be if they were using the actual part.  A simulator will show the internal processor state and also that of the outputs, as well as allowing input signals to be generated. 6/7/2016Dept of CSE, University of Dhaka 17
  • 18.
    General Architecture 6/7/2016Dept ofCSE, University of Dhaka 18
  • 19.
    General Architecture  Thearchitecture of a typical microcontroller is complex and may include the following:  A CPU, ranging from simple 4-bit to complex 64-bit processers.  Peripherals such as timers and event counters.  RAM (volatile memory) for data storage. The data is stored in the form of registers, and the general-purpose registers store information that interacts with the arithmetic logical unit (ALU). 6/7/2016Dept of CSE, University of Dhaka 19
  • 20.
    General Architecture  ROM,EPROM, EEPROM or flash memory for program and operating parameter storage.  Programming capabilities.  Serial input/output such as serial ports.  A clock generator for resonator, quartz timing crystal or RC circuit.  Analog-to-digital convertors.  Serial ports.  Data bus to carry information. 6/7/2016Dept of CSE, University of Dhaka 20
  • 21.
    Common Microcontrollers  Altera Atmel  EPSON  ELAN  Fujitsu  Infineon  Intel 6/7/2016Dept of CSE, University of Dhaka 21
  • 22.
    Common Microcontrollers  Panasonic Parallax  Rockwell  Sony  Spansion  Toshiba  XMOS 6/7/2016Dept of CSE, University of Dhaka 22
  • 23.
    Common Microcontrollers 6/7/2016Dept ofCSE, University of Dhaka 23
  • 24.
    Common Microcontrollers 6/7/2016Dept ofCSE, University of Dhaka 24
  • 25.
    Common Microcontrollers 6/7/2016Dept ofCSE, University of Dhaka 25
  • 26.
    Common Microcontrollers 6/7/2016Dept ofCSE, University of Dhaka 26
  • 27.
    Common Microcontrollers 6/7/2016Dept ofCSE, University of Dhaka 27
  • 28.
    Common Microcontrollers 6/7/2016Dept ofCSE, University of Dhaka 28
  • 29.
    Benefits of microcontrollers Cost advantage: The biggest advantage of microcontrollers against larger microprocessors is that the design and hardware costs are much lesser and can be kept to a minimum.  A microcontroller is cheap to replace, while microprocessors are ten times more expensive. 6/7/2016Dept of CSE, University of Dhaka 29
  • 30.
    Benefits of microcontrollers Lesser power usage: Microcontrollers are generally built using a technology known as Complementary Metal Oxide Semiconductor (CMOS).  This technology is a competent fabrication system that uses less power and is more immune to power spikes than other techniques. 6/7/2016Dept of CSE, University of Dhaka 30
  • 31.
    Benefits of microcontrollers All-in-one: A microcontroller usually comprises of a CPU, ROM, RAM and I/O ports, built within it to execute a single and dedicated task.  On the other hand, a microprocessor generally does not have a RAM, ROM or IO pins and generally uses its pins as a bus to interface to peripherals such as RAM, ROM, serial ports, digital and analog IO 6/7/2016Dept of CSE, University of Dhaka 31
  • 32.
    Thanks 6/7/2016Dept of CSE,University of Dhaka 32