microcontroller and applications...microcontroller microcontrollers have instructions to set and...
TRANSCRIPT
Microprocessors And Microcontroller
By: Dr. Attiya Baqai
Semester : 4th , 5th (TL, ES) Assistant Professor,
Course Code : ES256 , ES313 Department of
Electronics, MUET.
Internal block diagram of CPU
Internal organisation of Computer
Architectures of Computers
CISC ◉Emphasis on hardware ◉ Includes multi- clock complex instructions ◉ Memory to memory: “LOAD” and “STORE” incorporated in instructions ◉Small code sizes, high cycles per second
RISC ◉Emphasis on software ◉ Single-clock, reduced instruction only ◉Register to register: “LOAD” and “STORE are independent instructions ◉ Low cycles per second, large code sizes ◉Spend more transistors on memory registers
Architectures of Computers
Difference; Microprocessor & Microcntroller
General
Purpose
Micro
processor
RAM ROM Timer
Serial
COM
Port
IO
Port
Data BUS
Address BUS
Control BUS
CPU RAM ROM
I/O Timer Serial
Port
General Purpose Microprocessors
Microcontrollers
Difference; Microprocessor & Microcntroller
Difference
Hardware Architecture Applications Instruction set
Microcontroller ◉Microcontrollers are found in small, minimum-component designs performing control oriented activities.
◉microcontrollers are used to perform specialized single tasks.
Applications
Microprocessor ◉Microprocessors are suited to processing information in computer systems ◉Microprocessors are which designed to be very general to perform any number of tasks (programs)
Microcontroller ◉On chip circuitry of CPU, limited amount of RAM & ROM,I/O ports, timers, ADC, built in interrupt system etc. ◉Small in size, occupy less space, cheap in price. ◉Microcontrollers usually must have low-power requirements 0.5 - 1 W
Hardware Architecture
Microprocessor ◉Microprocessors do not have such devices on chip. Designer have to connect them externally for microprocessor based embedded system. ◉bulkier and more expensive. ◉10 - 50 W for general purpose desktop CPUs.
Microcontroller ◉Microcontrollers have instructions to set and clear individual bits and perform other bit oriented operations.
◉The instructions must be extremely compact with the majority implemented in a single byte.
Instruction set
Microprocessor ◉Microprocessor instruction sets are processing intensive implying they have powerful addressing modes with instructions for operations on large volume of data. ◉Instructions operate on nibbles, bytes, words or even double words.
An Embedded system Uses a microprocessor (or microcontroller) to do one and only one task.
Technology for Embedded System
Embedded systems are controlled by one or more main processing cores that are typically either
◉Microcontrollers
◉Microprocessors
◉Digital Signal Processors (DSP)
◉FPGA’s
A short list of Embedded Systems Anti-lock brakes Auto-focus cameras
Automatic teller machines
Automatic toll systems
Automatic transmission
Avionic systems
Battery chargers
Camcorders
Cell phones
Cell-phone base stations
Cordless phones
Cruise control
Video game consoles
Digital cameras
Disk drives
Electronic card readers
Electronic instruments
Electronic toys/games
Factory control
Fax machines
Fingerprint identifiers
Home security systems
Life-support systems
Washers and dryers
Modems
MPEG decoders
Network cards
Network switches/routers
On-board navigation
Pagers
Photocopiers
Point-of-sale systems
Portable video games
Printers
Satellite phones
Scanners
Smart ovens/dishwashers
Speech recognizers
Stereo systems
Teleconferencing systems
Televisions
Temperature controllers
Theft tracking systems
TV set-top boxes
VCR’s, DVD players
Most common 8 bit Microcontrollers
◉ INTEL’s 8051
◉ Free Scale Semiconductor’s (Motorola) 68HC08/68HC11
◉ Atmel’s AVR
◉ Zilog’s Z8
◉ Microchip Technology PIC 16X
◉ Phillips/ Signatics
Criteria for choosing a Microcontroller
◉ Must meet the task efficiently and cost effectively. The analysis may include: o Speed o Packaging o Power consumption o Amount of RAM and ROM on chip o Number of I/Os o Number of Timers o How easy is it to upgrade to higher performance and/or lower power
consumption versions. o Cost per unit
Criteria for choosing a Microcontroller
◉ How easy it is to develop products around it. Key considerations include: o Availability of an assembler, debugger, o a code efficient C language compiler o emulator o technical support ◉Should be readily available in needed quantities both now and in future.
AVR family Overview
◉Classic AVR-e.g. AT90S2313, AT90S4433
◉Mega e.g. ATmega8, ATmega32, ATmega128
◉Tiny e.g. ATtiny13, ATtiny25
◉Special Purpose AVR-e.g. AT90PWM216,AT90USB1287
Classic AVR (AT90Sxxxx)
mega AVR (ATmegaxxxx)
Tiny AVR (ATtinyxxxx)
Special Purpose AVR
AVR IC Packages
AVR Part Numbers ATmega128
ATtiny44
Atmel group Flash =128K
Atmel Flash =4K
AT90S4433
Atmel Classic group Flash =4K
Tiny group
Comparison of different microcontrollers
AVR On Chip ROM Size & Address Space
AVR’s CPU
PROGRAM
ROM
PortsOSC
Timers
Other
Peripherals
Program
BusData
Bus
RAM
I/O
PINS
EEPROM
Interrupt
Unit
General
Purpose
Registers
CPU
data busaddress bus
control busData
Bus
AVR CPU and Memory space
$0000
$0001
$0020
General
purpose
RAM
(SRAM)
R0
R1
R2
$001F
$005F
R31
...
TWBR
TWSR
SPH
SREG
...
General
Purpose
Registers
Standard I/O
Registers
$00
$01
$3E
$3F
$0060
...
...
Data Address
Space
I/O Address
...
8 bit
$FFFF
CPU PC
ALU
registers
R1
R0
R15
R2
…
R16
R17
…
R30
R31 Instruction Register
Instruction decoder
SREG: I T H S V N C Z
Data Memory with Extended I/O
Data Memory size
Any questions ?
Thanks!