SlideShare a Scribd company logo
Chapter 1
Fundamentals of
Microprocessor and
Microcontroller
Dr. Farid Farahmand
Updated: Monday, February 5, 2018
Evolution
n First came transistors
n Integrated circuits
¨ SSI (Small-Scale Integration) to ULSI
¨ Very Large Scale Integration circuits (VLSI)
n 1- Microprocessors (MPU)
¨ Microcomputers (with CPU being a microprocessor)
¨ Components: Memory, CPU, Peripherals (I/O)
¨ Example: Personal computers
n 2- Microcontroller (MCU)
¨ Microcomputers (with CPU being a microprocessor)
¨ Many special function peripheral are integrated on a single
circuit
¨ Types: General Purpose or Embedded System (with special
functionalities)
Microcontrollers –
Embedded Systems
n An embedded system is a special-purpose computer
system designed to perform one or a few dedicated
functions often with real-time
n An integrated device which consists of multiple devices
¨ Microprocessor (MPU)
¨ Memory
¨ I/O (Input/Output) ports
n Often has its own dedicated software
Embedded Systems
4
Amazon Warehouse
5
Kiva Robot
Microprocessor-Based Systems
• Central Processing Unit (CPU)
• Memory
• Input/Output (I/O) circuitry
• Buses
– Address bus
– Data bus
– Control bus
Arithmetic
Logic
Unit
Register
Arrays
Control Unit
GP-
CPU
CLK Reg
MPU
CPU
Microprocessor-based System
Microprocessor-Based System with
Buses: Address, Data, and Control
Microprocessor-based Systems
Microprocessor
n The microprocessor (MPU) is a computing and
logic device that executes binary instructions in a
sequence stored in memory.
n Characteristics:
¨General purpose central processor unit (CPU)
¨Binary
¨Register-based
¨Clock-driven
¨Programmable
Microprocessor-based Systems
Microprocessor
n the “brains” of the computer
¨ its job is to fetch instructions, decode them, and then execute them
¨ 8/16/32/etc –bit (how it moves the data
n contains: Arithmetic
Logic
Unit
Register
Arrays
Control Unit
ALU performs computing tasks – manipulates the data/ performs numerical and logical
computations
Registers are used for temp. storage
Control unit is used for timing and other controlling functions – contains a program
counter (next instruction’s address and status register)
System software: A group of programs that monitors the functions of the entire system
Remember
Microprocessor-based Systems
Memory
n Memory is a group of registers
n 16 register – address: 0-15 – in binary: 0-
1111; Address lines: A0-A3
n Serves two major purposes
q storing the binary codes for the sequence of
instructions specified by programs (program)
q storing binary data that the computer needs
to execute instructions (data)
Microprocessor-based Systems
Memory Types
¨ R/W: Read/Write Memory; also called RAM
n It is volatile (losses information as power is
removed)
n Write means the processor can store information
n Read means the processor can receive information
from the memory
n Acts like a Blackboard!
¨ ROM: Read-Only memory;
n It is typically non-volatile (permanent) – can be
erasable
n It is similar to a Page from your textbook
Microprocessor-based Systems
Memory Classification
Expensive
Fast/
Cheap
Slow
Onetime programmable
Electronically Erasable
PROM
Basic Technologies:
Semiconductor
Magnetic
Optical
(or combination)
Microprocessor-based Systems
Memory Classification
Expensive
Fast/
Cheap
Slow
Onetime programmable
Electronically Erasable
PROM
-4/6 transistor to
save a single bit
- Volatile
- Fast but
expensive
-one transistor and one
capacitor to store a bit
-Leakage problem, thus
requires refreshing
-Used for dynamic
data/program storage
-Cheap and slow!
Erasable ROMs
n Marked Programmed ROM
¨ Programmed by the manufacturer
n Programmable ROM (PROM)
¨ Can be programmed in the field via the programmer
n Erasable Programmable ROM (EPROM)
¨ Uses ultraviolet light to erase (through a quartz window)
¨ OTP refers to one-time programmable
n Electrically Erasable Programmable ROM (EEPROM)
¨ Each program location can be individually erased
¨ Expensive
¨ Requires programmer
n FLASH
¨ Can be programmed in-circuit (in-system)
¨ Easy to erase (no programmer)
¨ Only one section can be erased/written at a time (typically 64 bytes at a time)
Microprocessor-based Systems
I/O Ports
n The way the computer communicates with the
outside world devices
n I/O ports are connected to Peripherals
¨ Peripherals are I/O devices
n Input devices
n Output devices
¨ Examples
n Printers and modems,
n keyboard and mouse
n scanner
n Universal Serial Bus (USB)
Microprocessor-based
Systems - BUS
n The three components – MPU, memory, and I/O – are connected by a
group of wires called the BUS
n Address bus
n consists of 16, 20, 24, or 32 parallel signal lines (wires) - unidirectional
n these lines contain the address of the memory location to read or written
n Control bus
¨ consists of 4 to 10 (or more) parallel signal lines
¨ CPU sends signals along these lines to memory and to I/O ports
n examples: Memory Read, Memory Write, I/O Read, I/O Write
n Data bus
¨ consists of 8,16, or 32 parallel signal lines
¨ bi-directional
¨ only one device at a time can have its outputs enabled,
¨ this requires the devices to have three-state output
Expanded Microprocessor-Based System
1. Note the directions
of busses
2. What is the width of
the address bus?
3. What is the value of
the Address but to
access the first
register of the
R/WM?
You must know how to
draw it!
Remember: 111 1111 1111 = 7FF = 2^11-1 = 2047
2^11=2K=2048
2^11 Requires 11 bits
2K
Registers or bytes of
memory
000
What?
How many bits
001
2K
Registers or bytes of
memory
800
801
How much memory do we have?
What?
How many bits
Example
2K
(2^11 = 2048)
Registers or bytes of
memory
000
2^11 -1=7FF
Requires 11 bits
001
2K
(2^11 = 2048)
Registers or bytes of
memory
800
FFF
Requires 12 bits
For a total of 4095 bytes
801
Total of 4K bytes of memory: 2^12 (FFF) à 12 bits ; last values 2^12-1 = 4096-1
Example
1G bytes of memory
000
2^30 -1=3FFF FFFF
Next number: 4000 0000 (in Hex)
001
Example
8 bits
30 bits!
800
FFF
Example of an 8-bit MPU
RAM
2K
ROM
2K
A15
A0
D7
D0
8-bit
So what are
microcontrollers?
What is a Microcontroller?
n A microcontroller is a small computer on a
single integrated circuit containing
¨processor core,
¨memory,
¨programmable input/output peripherals
n Used for specific (embedded) applications
Embedded controllers
n Used to control smart machines
n Examples: printers, auto braking systems
n Also called microcontrollers or
microcontroller units (MCU)
Embedded controllers
Software Characteristics
n No operating systems
n Execute a single program, tailored exactly to the
controller hardware
n Assembly language (vs. High-level language)
¨Not transportable, machine specific
¨Programmer need to know CPU architecture
¨Speed
¨Program size
¨Uniqueness
Microcontroller Unit (MCU)
Block Diagram
n An integrated electronic computing and logic device that
includes three major components on a single chip
¨ Microprocessor
¨ Memory
¨ I/O ports
n Includes support devices
¨ Timers
¨ A/D converter
¨ Serial I/O
¨ Parallel Slave Port
n All components connected by common communication
lines called the system bus.
First Microcontrollers
n IBM started using Intel processors in its PC
¨Intel started its 8042 and 8048 (8-bit
microcontroller) – using in printers
n Apple Macintosh used Motorola
n 1980 Intel abandoned microcontroller business
n By 1989 Microchip was a major player in
designing microcontrollers
¨PIC: Peripheral Interface Controller
Different Microcontrollers (MCU)
http://en.wikipedia.org/wiki/Microcontroller A more complete list is here: http://en.wikipedia.org/wiki/Category:Microcontrollers
What is the
difference?
8/16/24/32 bits
Architecture
Package
Capability
Memory
Software (IDE)/cloud
ADC (10-12 bit)
MCU Architecture
n RISC
¨ Reduced instruction set computer
¨ Simple operations
¨ Simple addressing modes
¨ Longer compiled program but faster to execute
¨ Uses pipelining
¨ Most embedded system
n CISC
¨ Complex instruction set computer
¨ More complex instructions (closer to high-level language
support)
¨ x86 standard (Intel, AMD, etc.), but even in the mainframe
territory CISC is dominant via the IBM/390 chip
Bench marks: How to compare MCUs together
MIPS: Million Instructions / second (Useful when the compilers are the same)
CISC vs RISC
CISC
Pentium/x86 are CISC-based
RISC
ARM-based
Most mobile-phones
Complex instructions require
multiple cycles
Reduced instructions take 1
cycle
Many instructions can reference
memory
Only Load and Store instructions
can reference memory
Instructions are executed one at
a time
Uses pipelining to execute
instructions
Few general registers Many general registers
RISC and CISC architectures are becoming more and more alike.
*Read the LINK on the web site!*
CISC vs RISC
RISC and CISC architectures are becoming more and more alike.
*Read the LINK on the web site!*
The Performance Equation
The following equation is commonly
used for expressing a computer's
performance ability:
The CISC approach
attempts to minimize the
number of instructions per
program, sacrificing the
number of cycles per
instruction.
RISC does the opposite, reducing the
cycles per instruction at the cost of
the number of instructions per
program.
8-bit Controllers…
(Main Players)
n Microchip
¨ RISC architecture (reduced instruction set computer)
¨ Has sold over 2 billion as of 2002
¨ Cost effective and rich in peripherals
n Motorola
¨ CISC architecture
¨ Has hundreds of instructions
¨ Examples: 68HC05, 68HC08, 68HC11
n Intel
¨ CISC architecture
¨ Has hundreds of instructions
¨ Examples: 8051, 8052
¨ Many difference manufacturers: Philips, Dallas/MAXIM Semiconductor, etc.
n Atmel
¨ RISC architecture (reduced instruction set computer) – with CISC instruction set!
¨ Cost effective and rich in peripherals
¨ Claims to be very code efficient – less memory for the same code!
¨ AVR (Advanced Virtual RISC): TunyAVR, MegAVR, XmegaAVR
n Freescale
n Ziglog (Z8)
What is the
difference?
Speed
Package
Power
RAM/ROM
IO Pins
Software (IDE)/cloud
A Bit About ARMs
Architecture (Advanced RISC Machine)
n ARM design takes the RISC based computer design
approach – Linux –like architecture
n ARM is a British semiconductor (and software) design
company that designs and licenses ARM processor
cores to semiconductor manufacturers
¨ They just sell the ARM core
¨ Other manufacturers license the core from them and then design
microcontrollers around that core by adding in peripherals and
memory to suit their design goals
n There are different cores for different applications
¨ Cortex-M0/M0+, Cortex-M3, or Cortex-M4.
ARM Processor IP
Applications of ARM-Based
Microcontrollers
http://en.wikipedia.org/wiki/List_of_applications_of_ARM_cores
Who is using ARM? Check this out!
Most Cellphones!
Design Examples …..
Microcontrollers vs. Microprocessors
MPU-Based Time
and Temperature System
MCU-Based Time
and Temperature System
References
n Computer History Museum: http://www.computerhistory.org/
n Read about microcontrollers:
http://www.mikroe.com/en/books/picbook/2_01chapter.htm
n Lots of good information exist on Wikipedia about microcontrollers
http://en.wikipedia.org/wiki/
n History of transistors:
http://inventors.about.com/library/weekly/aa061698.htm
n Nice transistor timeline by Intel:
http://www.intel.com/technology/timeline.pdf
n I used a few slides from here:
http://www.ceng.metu.edu.tr/courses/ceng336/_documents/introduct
ion.pdf
n ARM related references:
¨ http://mc2.unl.edu/2013/10/03/getting-started-with-arm-microcontrollers/
¨ http://www4.cs.fau.de/Lehre/SS06/HS_AKES/slides/ARM.pdf - Very good reference !
References - RISC
n http://cse.stanford.edu/class/sophomore-
college/projects-00/risc/
n http://en.wikipedia.org/wiki/Complex_instruction_set_co
mputer
n http://en.wikipedia.org/wiki/RISC
n http://arstechnica.com/articles/paedia/cpu/pipelining-
1.ars/4

More Related Content

Similar to Chapter_2_Embedded Systems Design_introduction_ARM.pdf (20)

PPT
Microprocessor
Embeddedbvp
 
PPT
presentation_microcontroller_1457634560_181219.ppt
LalithKumar818864
 
PPTX
4CS3-MPI-Unit-1.pptx
Lofi19
 
PDF
microprocessormicrocontrollerbysanat-140107013112-phpapp02.pdf
MECHANICALENGINEERIN19
 
PPT
Embeded system by Mitesh Kumar
Mitesh Kumar
 
PPTX
Microcontoller and Embedded System
Karan Thakkar
 
PPTX
Microprocessor by Saira Hussain...IT department
sairahussainsaira62
 
PDF
Microprocessors, Microcomputers and Assembly Language, Microprocessor Archit...
Bkannan2
 
PPTX
introduction to embedded-converted new one
DrVikasMahor
 
PPT
Embedded System Basics
Dr M Muruganandam Masilamani
 
PPTX
Module -4_microprocessor (1).pptx
DrVaibhavMeshram
 
PDF
Microprocessors evolution introduction to microprocessor
Vijay Kumar
 
PPT
Origin of Microprocessor and Classification of Microprocessor
Vijay Kumar
 
PPTX
Unit 2 - Microprocessor & Microcontroller.pptx
Charunnath S V
 
PPT
MKLecture01eng.ppt
ssuser7a33ea
 
PDF
1. Microcomputer Systems AIUB COA COURSE SLIDES
hti91384
 
PPTX
Microcontroller overview 1
Sally Salem
 
PPTX
Embedded System basic and classifications
rajkciitr
 
PPT
microprocessor-and-microcontroller
jhcid
 
Microprocessor
Embeddedbvp
 
presentation_microcontroller_1457634560_181219.ppt
LalithKumar818864
 
4CS3-MPI-Unit-1.pptx
Lofi19
 
microprocessormicrocontrollerbysanat-140107013112-phpapp02.pdf
MECHANICALENGINEERIN19
 
Embeded system by Mitesh Kumar
Mitesh Kumar
 
Microcontoller and Embedded System
Karan Thakkar
 
Microprocessor by Saira Hussain...IT department
sairahussainsaira62
 
Microprocessors, Microcomputers and Assembly Language, Microprocessor Archit...
Bkannan2
 
introduction to embedded-converted new one
DrVikasMahor
 
Embedded System Basics
Dr M Muruganandam Masilamani
 
Module -4_microprocessor (1).pptx
DrVaibhavMeshram
 
Microprocessors evolution introduction to microprocessor
Vijay Kumar
 
Origin of Microprocessor and Classification of Microprocessor
Vijay Kumar
 
Unit 2 - Microprocessor & Microcontroller.pptx
Charunnath S V
 
MKLecture01eng.ppt
ssuser7a33ea
 
1. Microcomputer Systems AIUB COA COURSE SLIDES
hti91384
 
Microcontroller overview 1
Sally Salem
 
Embedded System basic and classifications
rajkciitr
 
microprocessor-and-microcontroller
jhcid
 

More from EngrNoumanMemon (14)

PDF
Digital Signal Processing lecture 3-v8.pdf
EngrNoumanMemon
 
PDF
Lecture 10 OSCILLATOR I Electronics Circuit design .PDF
EngrNoumanMemon
 
PPTX
Engineering Physics chapter ch05-10e.pptx
EngrNoumanMemon
 
PPT
Engineering Physics Ch:20 WaveOptics.ppt
EngrNoumanMemon
 
PPT
Engineering Physics Ereflect&refract.ppt
EngrNoumanMemon
 
PPTX
Engineering Physics chapter ch04-10e.pptx
EngrNoumanMemon
 
PPT
Engineering physics chapter 7 ch07-10e.ppt
EngrNoumanMemon
 
PPTX
Engineering Physics chapter 06 ch06-10e.pptx
EngrNoumanMemon
 
PPTX
Engineering Physics chapter 14 ch14-10e.pptx
EngrNoumanMemon
 
PPT
Engineering Physics chapter 18 ch18-10e.ppt
EngrNoumanMemon
 
PPTX
Chapter 18 Engineering Physics ch18.pptx
EngrNoumanMemon
 
PPTX
Engineering Physics Lec 3 ch03-10e.pptx
EngrNoumanMemon
 
PPTX
Engineering Physics Lec 2 ch02-10e.pptx
EngrNoumanMemon
 
PPTX
Engineering Physics Lec 01 ch01-10e.pptx
EngrNoumanMemon
 
Digital Signal Processing lecture 3-v8.pdf
EngrNoumanMemon
 
Lecture 10 OSCILLATOR I Electronics Circuit design .PDF
EngrNoumanMemon
 
Engineering Physics chapter ch05-10e.pptx
EngrNoumanMemon
 
Engineering Physics Ch:20 WaveOptics.ppt
EngrNoumanMemon
 
Engineering Physics Ereflect&refract.ppt
EngrNoumanMemon
 
Engineering Physics chapter ch04-10e.pptx
EngrNoumanMemon
 
Engineering physics chapter 7 ch07-10e.ppt
EngrNoumanMemon
 
Engineering Physics chapter 06 ch06-10e.pptx
EngrNoumanMemon
 
Engineering Physics chapter 14 ch14-10e.pptx
EngrNoumanMemon
 
Engineering Physics chapter 18 ch18-10e.ppt
EngrNoumanMemon
 
Chapter 18 Engineering Physics ch18.pptx
EngrNoumanMemon
 
Engineering Physics Lec 3 ch03-10e.pptx
EngrNoumanMemon
 
Engineering Physics Lec 2 ch02-10e.pptx
EngrNoumanMemon
 
Engineering Physics Lec 01 ch01-10e.pptx
EngrNoumanMemon
 
Ad

Recently uploaded (20)

PPTX
Element 7. CHEMICAL AND BIOLOGICAL AGENT.pptx
merrandomohandas
 
PPTX
Mechanical Design of shell and tube heat exchangers as per ASME Sec VIII Divi...
shahveer210504
 
PDF
Design Thinking basics for Engineers.pdf
CMR University
 
PPTX
Green Building & Energy Conservation ppt
Sagar Sarangi
 
DOCX
CS-802 (A) BDH Lab manual IPS Academy Indore
thegodhimself05
 
PDF
Reasons for the succes of MENARD PRESSUREMETER.pdf
majdiamz
 
PPTX
Worm gear strength and wear calculation as per standard VB Bhandari Databook.
shahveer210504
 
PPTX
美国电子版毕业证南卡罗莱纳大学上州分校水印成绩单USC学费发票定做学位证书编号怎么查
Taqyea
 
PPTX
Introduction to Design of Machine Elements
PradeepKumarS27
 
PPTX
What is Shot Peening | Shot Peening is a Surface Treatment Process
Vibra Finish
 
PPTX
MobileComputingMANET2023 MobileComputingMANET2023.pptx
masterfake98765
 
PDF
Biomechanics of Gait: Engineering Solutions for Rehabilitation (www.kiu.ac.ug)
publication11
 
PPTX
GitOps_Without_K8s_Training_detailed git repository
DanialHabibi2
 
PPTX
Day2 B2 Best.pptx
helenjenefa1
 
PDF
Ethics and Trustworthy AI in Healthcare – Governing Sensitive Data, Profiling...
AlqualsaDIResearchGr
 
PDF
Zilliz Cloud Demo for performance and scale
Zilliz
 
PPTX
265587293-NFPA 101 Life safety code-PPT-1.pptx
chandermwason
 
PDF
Viol_Alessandro_Presentazione_prelaurea.pdf
dsecqyvhbowrzxshhf
 
PPTX
Damage of stability of a ship and how its change .pptx
ehamadulhaque
 
PDF
Pressure Measurement training for engineers and Technicians
AIESOLUTIONS
 
Element 7. CHEMICAL AND BIOLOGICAL AGENT.pptx
merrandomohandas
 
Mechanical Design of shell and tube heat exchangers as per ASME Sec VIII Divi...
shahveer210504
 
Design Thinking basics for Engineers.pdf
CMR University
 
Green Building & Energy Conservation ppt
Sagar Sarangi
 
CS-802 (A) BDH Lab manual IPS Academy Indore
thegodhimself05
 
Reasons for the succes of MENARD PRESSUREMETER.pdf
majdiamz
 
Worm gear strength and wear calculation as per standard VB Bhandari Databook.
shahveer210504
 
美国电子版毕业证南卡罗莱纳大学上州分校水印成绩单USC学费发票定做学位证书编号怎么查
Taqyea
 
Introduction to Design of Machine Elements
PradeepKumarS27
 
What is Shot Peening | Shot Peening is a Surface Treatment Process
Vibra Finish
 
MobileComputingMANET2023 MobileComputingMANET2023.pptx
masterfake98765
 
Biomechanics of Gait: Engineering Solutions for Rehabilitation (www.kiu.ac.ug)
publication11
 
GitOps_Without_K8s_Training_detailed git repository
DanialHabibi2
 
Day2 B2 Best.pptx
helenjenefa1
 
Ethics and Trustworthy AI in Healthcare – Governing Sensitive Data, Profiling...
AlqualsaDIResearchGr
 
Zilliz Cloud Demo for performance and scale
Zilliz
 
265587293-NFPA 101 Life safety code-PPT-1.pptx
chandermwason
 
Viol_Alessandro_Presentazione_prelaurea.pdf
dsecqyvhbowrzxshhf
 
Damage of stability of a ship and how its change .pptx
ehamadulhaque
 
Pressure Measurement training for engineers and Technicians
AIESOLUTIONS
 
Ad

Chapter_2_Embedded Systems Design_introduction_ARM.pdf

  • 1. Chapter 1 Fundamentals of Microprocessor and Microcontroller Dr. Farid Farahmand Updated: Monday, February 5, 2018
  • 2. Evolution n First came transistors n Integrated circuits ¨ SSI (Small-Scale Integration) to ULSI ¨ Very Large Scale Integration circuits (VLSI) n 1- Microprocessors (MPU) ¨ Microcomputers (with CPU being a microprocessor) ¨ Components: Memory, CPU, Peripherals (I/O) ¨ Example: Personal computers n 2- Microcontroller (MCU) ¨ Microcomputers (with CPU being a microprocessor) ¨ Many special function peripheral are integrated on a single circuit ¨ Types: General Purpose or Embedded System (with special functionalities)
  • 3. Microcontrollers – Embedded Systems n An embedded system is a special-purpose computer system designed to perform one or a few dedicated functions often with real-time n An integrated device which consists of multiple devices ¨ Microprocessor (MPU) ¨ Memory ¨ I/O (Input/Output) ports n Often has its own dedicated software
  • 6. Microprocessor-Based Systems • Central Processing Unit (CPU) • Memory • Input/Output (I/O) circuitry • Buses – Address bus – Data bus – Control bus
  • 8. Microprocessor-Based System with Buses: Address, Data, and Control
  • 9. Microprocessor-based Systems Microprocessor n The microprocessor (MPU) is a computing and logic device that executes binary instructions in a sequence stored in memory. n Characteristics: ¨General purpose central processor unit (CPU) ¨Binary ¨Register-based ¨Clock-driven ¨Programmable
  • 10. Microprocessor-based Systems Microprocessor n the “brains” of the computer ¨ its job is to fetch instructions, decode them, and then execute them ¨ 8/16/32/etc –bit (how it moves the data n contains: Arithmetic Logic Unit Register Arrays Control Unit ALU performs computing tasks – manipulates the data/ performs numerical and logical computations Registers are used for temp. storage Control unit is used for timing and other controlling functions – contains a program counter (next instruction’s address and status register) System software: A group of programs that monitors the functions of the entire system
  • 12. Microprocessor-based Systems Memory n Memory is a group of registers n 16 register – address: 0-15 – in binary: 0- 1111; Address lines: A0-A3 n Serves two major purposes q storing the binary codes for the sequence of instructions specified by programs (program) q storing binary data that the computer needs to execute instructions (data)
  • 13. Microprocessor-based Systems Memory Types ¨ R/W: Read/Write Memory; also called RAM n It is volatile (losses information as power is removed) n Write means the processor can store information n Read means the processor can receive information from the memory n Acts like a Blackboard! ¨ ROM: Read-Only memory; n It is typically non-volatile (permanent) – can be erasable n It is similar to a Page from your textbook
  • 14. Microprocessor-based Systems Memory Classification Expensive Fast/ Cheap Slow Onetime programmable Electronically Erasable PROM Basic Technologies: Semiconductor Magnetic Optical (or combination)
  • 15. Microprocessor-based Systems Memory Classification Expensive Fast/ Cheap Slow Onetime programmable Electronically Erasable PROM -4/6 transistor to save a single bit - Volatile - Fast but expensive -one transistor and one capacitor to store a bit -Leakage problem, thus requires refreshing -Used for dynamic data/program storage -Cheap and slow!
  • 16. Erasable ROMs n Marked Programmed ROM ¨ Programmed by the manufacturer n Programmable ROM (PROM) ¨ Can be programmed in the field via the programmer n Erasable Programmable ROM (EPROM) ¨ Uses ultraviolet light to erase (through a quartz window) ¨ OTP refers to one-time programmable n Electrically Erasable Programmable ROM (EEPROM) ¨ Each program location can be individually erased ¨ Expensive ¨ Requires programmer n FLASH ¨ Can be programmed in-circuit (in-system) ¨ Easy to erase (no programmer) ¨ Only one section can be erased/written at a time (typically 64 bytes at a time)
  • 17. Microprocessor-based Systems I/O Ports n The way the computer communicates with the outside world devices n I/O ports are connected to Peripherals ¨ Peripherals are I/O devices n Input devices n Output devices ¨ Examples n Printers and modems, n keyboard and mouse n scanner n Universal Serial Bus (USB)
  • 18. Microprocessor-based Systems - BUS n The three components – MPU, memory, and I/O – are connected by a group of wires called the BUS n Address bus n consists of 16, 20, 24, or 32 parallel signal lines (wires) - unidirectional n these lines contain the address of the memory location to read or written n Control bus ¨ consists of 4 to 10 (or more) parallel signal lines ¨ CPU sends signals along these lines to memory and to I/O ports n examples: Memory Read, Memory Write, I/O Read, I/O Write n Data bus ¨ consists of 8,16, or 32 parallel signal lines ¨ bi-directional ¨ only one device at a time can have its outputs enabled, ¨ this requires the devices to have three-state output
  • 19. Expanded Microprocessor-Based System 1. Note the directions of busses 2. What is the width of the address bus? 3. What is the value of the Address but to access the first register of the R/WM? You must know how to draw it! Remember: 111 1111 1111 = 7FF = 2^11-1 = 2047 2^11=2K=2048 2^11 Requires 11 bits
  • 20. 2K Registers or bytes of memory 000 What? How many bits 001 2K Registers or bytes of memory 800 801 How much memory do we have? What? How many bits Example
  • 21. 2K (2^11 = 2048) Registers or bytes of memory 000 2^11 -1=7FF Requires 11 bits 001 2K (2^11 = 2048) Registers or bytes of memory 800 FFF Requires 12 bits For a total of 4095 bytes 801 Total of 4K bytes of memory: 2^12 (FFF) à 12 bits ; last values 2^12-1 = 4096-1 Example
  • 22. 1G bytes of memory 000 2^30 -1=3FFF FFFF Next number: 4000 0000 (in Hex) 001 Example 8 bits 30 bits!
  • 23. 800 FFF Example of an 8-bit MPU RAM 2K ROM 2K A15 A0 D7 D0 8-bit
  • 25. What is a Microcontroller? n A microcontroller is a small computer on a single integrated circuit containing ¨processor core, ¨memory, ¨programmable input/output peripherals n Used for specific (embedded) applications
  • 26. Embedded controllers n Used to control smart machines n Examples: printers, auto braking systems n Also called microcontrollers or microcontroller units (MCU)
  • 27. Embedded controllers Software Characteristics n No operating systems n Execute a single program, tailored exactly to the controller hardware n Assembly language (vs. High-level language) ¨Not transportable, machine specific ¨Programmer need to know CPU architecture ¨Speed ¨Program size ¨Uniqueness
  • 28. Microcontroller Unit (MCU) Block Diagram n An integrated electronic computing and logic device that includes three major components on a single chip ¨ Microprocessor ¨ Memory ¨ I/O ports n Includes support devices ¨ Timers ¨ A/D converter ¨ Serial I/O ¨ Parallel Slave Port n All components connected by common communication lines called the system bus.
  • 29. First Microcontrollers n IBM started using Intel processors in its PC ¨Intel started its 8042 and 8048 (8-bit microcontroller) – using in printers n Apple Macintosh used Motorola n 1980 Intel abandoned microcontroller business n By 1989 Microchip was a major player in designing microcontrollers ¨PIC: Peripheral Interface Controller
  • 30. Different Microcontrollers (MCU) http://en.wikipedia.org/wiki/Microcontroller A more complete list is here: http://en.wikipedia.org/wiki/Category:Microcontrollers What is the difference? 8/16/24/32 bits Architecture Package Capability Memory Software (IDE)/cloud ADC (10-12 bit)
  • 31. MCU Architecture n RISC ¨ Reduced instruction set computer ¨ Simple operations ¨ Simple addressing modes ¨ Longer compiled program but faster to execute ¨ Uses pipelining ¨ Most embedded system n CISC ¨ Complex instruction set computer ¨ More complex instructions (closer to high-level language support) ¨ x86 standard (Intel, AMD, etc.), but even in the mainframe territory CISC is dominant via the IBM/390 chip Bench marks: How to compare MCUs together MIPS: Million Instructions / second (Useful when the compilers are the same)
  • 32. CISC vs RISC CISC Pentium/x86 are CISC-based RISC ARM-based Most mobile-phones Complex instructions require multiple cycles Reduced instructions take 1 cycle Many instructions can reference memory Only Load and Store instructions can reference memory Instructions are executed one at a time Uses pipelining to execute instructions Few general registers Many general registers RISC and CISC architectures are becoming more and more alike. *Read the LINK on the web site!*
  • 33. CISC vs RISC RISC and CISC architectures are becoming more and more alike. *Read the LINK on the web site!* The Performance Equation The following equation is commonly used for expressing a computer's performance ability: The CISC approach attempts to minimize the number of instructions per program, sacrificing the number of cycles per instruction. RISC does the opposite, reducing the cycles per instruction at the cost of the number of instructions per program.
  • 34. 8-bit Controllers… (Main Players) n Microchip ¨ RISC architecture (reduced instruction set computer) ¨ Has sold over 2 billion as of 2002 ¨ Cost effective and rich in peripherals n Motorola ¨ CISC architecture ¨ Has hundreds of instructions ¨ Examples: 68HC05, 68HC08, 68HC11 n Intel ¨ CISC architecture ¨ Has hundreds of instructions ¨ Examples: 8051, 8052 ¨ Many difference manufacturers: Philips, Dallas/MAXIM Semiconductor, etc. n Atmel ¨ RISC architecture (reduced instruction set computer) – with CISC instruction set! ¨ Cost effective and rich in peripherals ¨ Claims to be very code efficient – less memory for the same code! ¨ AVR (Advanced Virtual RISC): TunyAVR, MegAVR, XmegaAVR n Freescale n Ziglog (Z8) What is the difference? Speed Package Power RAM/ROM IO Pins Software (IDE)/cloud
  • 35. A Bit About ARMs Architecture (Advanced RISC Machine) n ARM design takes the RISC based computer design approach – Linux –like architecture n ARM is a British semiconductor (and software) design company that designs and licenses ARM processor cores to semiconductor manufacturers ¨ They just sell the ARM core ¨ Other manufacturers license the core from them and then design microcontrollers around that core by adding in peripherals and memory to suit their design goals n There are different cores for different applications ¨ Cortex-M0/M0+, Cortex-M3, or Cortex-M4.
  • 41. References n Computer History Museum: http://www.computerhistory.org/ n Read about microcontrollers: http://www.mikroe.com/en/books/picbook/2_01chapter.htm n Lots of good information exist on Wikipedia about microcontrollers http://en.wikipedia.org/wiki/ n History of transistors: http://inventors.about.com/library/weekly/aa061698.htm n Nice transistor timeline by Intel: http://www.intel.com/technology/timeline.pdf n I used a few slides from here: http://www.ceng.metu.edu.tr/courses/ceng336/_documents/introduct ion.pdf n ARM related references: ¨ http://mc2.unl.edu/2013/10/03/getting-started-with-arm-microcontrollers/ ¨ http://www4.cs.fau.de/Lehre/SS06/HS_AKES/slides/ARM.pdf - Very good reference !
  • 42. References - RISC n http://cse.stanford.edu/class/sophomore- college/projects-00/risc/ n http://en.wikipedia.org/wiki/Complex_instruction_set_co mputer n http://en.wikipedia.org/wiki/RISC n http://arstechnica.com/articles/paedia/cpu/pipelining- 1.ars/4