Upload
pranshu-mishra
View
251
Download
0
Embed Size (px)
Citation preview
7/31/2019 Basics of Microcontroller
1/27
By :- Pranshu Mishra
Reg no.:- 20092015
7/31/2019 Basics of Microcontroller
2/27
What is Microcontroller? A microcontroller is a small, low-cost computer-on-a-chip which
usually
includes:
An 8 or 16 bit microprocessor (CPU).
A small amount of RAM.
Programmable ROM and/or flash memory.
Parallel and/or serial I/O.
Timers and signal generators.
Analog to Digital (A/D) and/or Digital to Analog (D/A)conversion.
Often used to run dedicated code that controls one or more tasksin the operation of a device or a system.
Also called embedded controllers, because the microcontrollerand support circuits are often built into, or embedded in, the
devices they control.
7/31/2019 Basics of Microcontroller
3/27
7/31/2019 Basics of Microcontroller
4/27
7/31/2019 Basics of Microcontroller
5/27
Why do we need to learn Microprocessors/controllers?
The microprocessor is the core ofcomputer systems.
Nowadays many communication, digitalentertainment, portable devices, arecontrolled by them.
A designer should know what types ofcomponents he needs, ways to reduceproduction costs and product reliable
7/31/2019 Basics of Microcontroller
6/27
Microprocessors
General-purpose microprocessor CPU for Computers
No RAM, ROM, I/O on CPU chip itself
ExampleIntels x86, Motorolas 680x0
CPU
General-
Purpose
Micro-processor
RAM ROM I/O
Port
TimerSerial
COM
Port
Data Bus
Address Bus
General-Purpose Microprocessor System
7/31/2019 Basics of Microcontroller
7/27
MICROCONTROLLER
A smaller computer
On-chip RAM, ROM, I/O ports...
ExampleMotorolas 6811, Intels 8051, Zilogs Z8
and PIC 16X
RAM ROM
I/O
PortTimer
Serial
COM
PortMicrocontroller
CPU
A single chip
7/31/2019 Basics of Microcontroller
8/27
MICROPROCESSOR VS MICROCONTROLLER
Microprocessor Microcontroller
CPU is stand-alone, RAM,
ROM, I/O, timer are separate
designer can decide on the
amount of ROM, RAM and I/O
ports.
expensive
versatility
general-purpose
CPU, RAM, ROM, I/O and
timer are all on a single chip
fix amount of on-chip ROM,
RAM, I/O ports
for applications in which cost,
power and space are critical
single-purpose
7/31/2019 Basics of Microcontroller
9/27
WHY MICROCONTROLLER IF WE HAVE
MICROPROCESSOR.. Microprocessors can not stand alone
instruction decoder, ALU, address/data/timing logic, (CPU)
Has no capability to interact with the outside world
memory, I/O ports, UARTS, etc. must be added to make it useful
Microcontrollers are small computing systems on a single chip
Central Processing Unit (CPU)
Program memory
Random Access Memory (RAM) EEPROM - Electrically Erasable Programmable Read Only Memory
A variety of peripheral devices
USARTs, Timer/Counters, ADC, DAC, I/O Ports, CANs, SPIs, etc., etc.
7/31/2019 Basics of Microcontroller
10/27
Features of Microcontroller
A micro-controller is a single integrated circuit,
commonly with the following features:
central processing unit - ranging from small andsimple 4-bit processors to complex 32- or 64-bit
processorsvolatile memory (RAM) for data storage ROM, EPROM, EEPROM or Flash memory for
program and operating parameter storage
discrete input and output bits, allowing control ordetection of the logic state of an individual packagepin
serial input/output such as serial ports (UARTs)
7/31/2019 Basics of Microcontroller
11/27
other serial communications interfaces like IC,
Serial Peripheral Interface and Controller AreaNetwork for system interconnect
peripherals such as timers, event counters, PWMgenerators, and watchdog
clock generator - often an oscillator for a quartztiming crystal, resonator or RC circuit
many include analog-to-digital converters, some
include digital-to-analog converters in-circuit programming and debugging support
7/31/2019 Basics of Microcontroller
12/27
COMPONENTS OF MICROCONTROLLER
From sensors
Single Chip
To actuators
Displays,keyboardetc.
RAM, EPROM,EEPROM, flash
http://www.circuitstoday.com/wp-content/uploads/2011/01/Microcontroller-Structure.gif7/31/2019 Basics of Microcontroller
13/27
http://www.circuitstoday.com/wp-content/uploads/2011/01/Microcontroller-Structure.gif7/31/2019 Basics of Microcontroller
14/27
CPU-The Processor core
CPU is the brain of a microcontroller .CPU isresponsible for fetching the instruction, decodes
it, then finally executed. CPU connects every partof a microcontroller into a single system. Theprimary function of CPU is fetching and decodinginstructions. Instruction fetched from program
memory must be decoded by the CPU.
7/31/2019 Basics of Microcontroller
15/27
MEMORY
The function of memory in a microcontroller issame as microprocessor. It is used to store data and
program. A microcontroller usually has a certainamount of RAM and ROM (EEPROM, EPROM,etc) or flash memories for storing program sourcecodes.
7/31/2019 Basics of Microcontroller
16/27
PARALLEL I/O PORTS
Parallel input/output ports are mainly used todrive/interface various devices such as LCDS, LEDS,printers, memories, etc to a microcontroller.
SERIAL PORTS
Serial ports provide various serial interfaces between
microcontroller and other peripherals like parallelports.
7/31/2019 Basics of Microcontroller
17/27
TIMER/COUNTERS
This is the one of the useful function of amicrocontroller. A microcontroller may have morethan one timer and counters. The timers and
counters provide all timing and counting functionsinside the microcontroller. The major operationsof this section is to perform clock functions,modulations, pulse generations, frequencymeasuring, making oscillations, etc. This also canbe used for counting external pulses.
7/31/2019 Basics of Microcontroller
18/27
ANALOG TO DIGITAL CONVERTER(ADC)
ADC converters are used for converting theanalog signal to digital form. The input
signal in this converter should be in analogform (e.g. sensor output) and the outputfrom this unit is in digital form. The digital
output can be use for various digitalapplications (e.g. measurement devices).
7/31/2019 Basics of Microcontroller
19/27
DIGITAL TO ANALOG CONVERTER(DAC)
DAC perform reversal operation of ADCconversion.DAC convert the digital signal
into analog format. It usually used forcontrolling analog devices like DC motors,various drives, etc.
7/31/2019 Basics of Microcontroller
20/27
INTERRUPT CONTROL
The interrupt control is used for providinginterrupt (delay) for a working program .The
interrupt may be external (activated byusing interrupt pin) or internal (by usinginterrupt instruction during programming).
7/31/2019 Basics of Microcontroller
21/27
Types Of Microcontroller
ARM core processors (from many vendors)
Atmel AVR (8-bit), AVR32 (32-bit), and AT91SAM (32-bit)
Cypress Semiconductor PSoC (Programmable System-on-Chip)
Freescale ColdFire (32-bit) and S08 (8-bit)
Freescale 68HC11 (8-bit) Intel 8051
Infineon: 8, 16, 32 Bit microcontrollers
STMicroelectronics STM8 (8-bit), ST10 (16-bit) and STM32
(32-bit) Texas Instruments TI MSP430 (16-bit)
Toshiba TLCS-870 (8-bit/16-bit).
7/31/2019 Basics of Microcontroller
22/27
APPLICATIONS Pocket pagers (low-power, interprets characters, user
interface)
Cameras (low-power, exposure and focus control, userinterface)
"Levelmeter (measures angle, audible and visual user
interface) Keyboard controllers (scanning, debounce, autorepeat,
diagnostics)
Modems (one for data transmission, one for command
processing) Plotters (command interpretation, encoders, motor
control)
Color copiers (paper positioning, color exposure, sensors)
7/31/2019 Basics of Microcontroller
23/27
Charge card pay phones (card reading, dialing, carrier
access) Lawn sprinkler controller (timer, valve control, user
interface)
Instrumentation (user interface, GPIB interface,
compute values) Closed-loop engine control (fuel/air mixture, ignition,
pressure sensing, etc.)
Antilock braking system control (monitors traction,controls brake)
Dynamic ride control (adjusts suspension)
7/31/2019 Basics of Microcontroller
24/27
ADVANTAGES
Microcontrollers act as a microcomputer withoutany digital parts.
As the higher integration inside microcontroller
reduce cost and size of the system. Usage of microcontroller is simple, easy for
troubleshoot and system maintaining.
Most of the pins are programmable by the user for
performing different functions. Easily interface additional RAM, ROM,I/O ports.
Low time required for performing operations.
7/31/2019 Basics of Microcontroller
25/27
DISADVANTAGES
Microcontrollers have got more complex architecturethan that of microprocessors.
Only perform limited number of executionssimultaneously.
Mostly used in micro-equipments.
Cannot interface high power devices directly.
7/31/2019 Basics of Microcontroller
26/27
CONCLUSION
Microcontroller is a single chip micro computer madethrough VLSI fabrication. A microcontroller also called anembedded controller because the microcontroller and its
support circuits are often built into, or embedded in, thedevices they control.
A microcontroller is available in different word lengths likemicroprocessors (4bit,8bit,16bit,32bit,64bit and 128 bit
microcontrollers are available today). Essentially a microprocessor with on-chip memories and
I/O devices.
7/31/2019 Basics of Microcontroller
27/27
Designed for specific functions All in one solution - Reduction in chip count
Reduced cost, power, physical size, etc. Examples
MC68332, MC68HC11, PPC555
Microcontrollers can be embedded in all sorts of everyday
devices They are inexpensive-
even in single pieces You can design complex
functionality in a small package