+ All Categories
Home > Documents > Microprocessor – Intro! Md. Atiqur Rahman Ahad. Introduction to Microcontrollers Parts of...

Microprocessor – Intro! Md. Atiqur Rahman Ahad. Introduction to Microcontrollers Parts of...

Date post: 26-Mar-2015
Category:
Upload: stephanie-emery
View: 216 times
Download: 0 times
Share this document with a friend
Popular Tags:
33
Microprocessor – Intro! Md. Atiqur Rahman Ahad
Transcript
Page 1: Microprocessor – Intro! Md. Atiqur Rahman Ahad. Introduction to Microcontrollers Parts of computer: CPU, memory, I/O CPU: Control and data path Memory:

Microprocessor – Intro!

Md. Atiqur Rahman Ahad

Page 2: Microprocessor – Intro! Md. Atiqur Rahman Ahad. Introduction to Microcontrollers Parts of computer: CPU, memory, I/O CPU: Control and data path Memory:

Introduction to Microcontrollers

Parts of computer: CPU, memory, I/O

• CPU: Control and data path

• Memory: Stores instruction and data

• Input/output: Interact with the outside of computers

Page 3: Microprocessor – Intro! Md. Atiqur Rahman Ahad. Introduction to Microcontrollers Parts of computer: CPU, memory, I/O CPU: Control and data path Memory:

Why Study Microprocessor Design?

Page 4: Microprocessor – Intro! Md. Atiqur Rahman Ahad. Introduction to Microcontrollers Parts of computer: CPU, memory, I/O CPU: Control and data path Memory:

Why Study Microprocessor Design?

° (as reported in Microprocessor Report, Vol 13, No. 5)• Emotion Engine: 6.2 GFLOPS, 75 million polygons per second

• Graphics Synthesizer: 2.4 Billion pixels per second

• Claim: Toy Story realism brought to games!

Sony Playstation 2000

Page 5: Microprocessor – Intro! Md. Atiqur Rahman Ahad. Introduction to Microcontrollers Parts of computer: CPU, memory, I/O CPU: Control and data path Memory:

Why Study Microprocessor Design?Wireless Sensor Networks PlatformPower Metering Application

Page 6: Microprocessor – Intro! Md. Atiqur Rahman Ahad. Introduction to Microcontrollers Parts of computer: CPU, memory, I/O CPU: Control and data path Memory:

Microcontrollers vs Microprocessors

• A microprocessor is a CPU on a single chip.

• If a microprocessor, its associated support circuitry, memory and peripheral I/O components are implemented on a single chip, it is a microcontroller.

Page 7: Microprocessor – Intro! Md. Atiqur Rahman Ahad. Introduction to Microcontrollers Parts of computer: CPU, memory, I/O CPU: Control and data path Memory:

What is an Embedded System?

• A combination of computer hardware and software, and perhaps additional mechanical or other parts, designed to perform a dedicated function.

• In some cases, embedded systems are part of a larger system or product, as is the case of an anti-lock braking system in a car. Contrast with general-purpose computer.

• Examples range from washing machines, cellular phones to missiles and space shuttles.

Page 8: Microprocessor – Intro! Md. Atiqur Rahman Ahad. Introduction to Microcontrollers Parts of computer: CPU, memory, I/O CPU: Control and data path Memory:

• Embedded Systems– Operations managed behind the scenes by a

microcontroller

• Microcontroller (MCU)– An integrated electronic computing device that

includes three major components on a single chip

• Microprocessor (MPU)

• Memory

• I/O (Input/Output) ports

Page 9: Microprocessor – Intro! Md. Atiqur Rahman Ahad. Introduction to Microcontrollers Parts of computer: CPU, memory, I/O CPU: Control and data path Memory:

What is an Embedded System?

• Electronic devices that incorporate a computer (usually a microprocessor) within their implementation.

• A computer is used in such devices primarily as a means to simplify the system design and to provide flexibility.

• Often the user of the device is not even aware that a computer is present.

Page 10: Microprocessor – Intro! Md. Atiqur Rahman Ahad. Introduction to Microcontrollers Parts of computer: CPU, memory, I/O CPU: Control and data path Memory:

Killer apps!

• Communications network routers, switches, hubs.

• Children’s toys • Fuel injection control, passenger environmental

controls, anti-lock braking systems, • Air bag controls, • GPS mapping.• Automotive Navigation systems, automatic landing

systems, flight attitude controls, • Engine controls, space exploration ……..

Page 11: Microprocessor – Intro! Md. Atiqur Rahman Ahad. Introduction to Microcontrollers Parts of computer: CPU, memory, I/O CPU: Control and data path Memory:

Where are the embedded devices?

Page 12: Microprocessor – Intro! Md. Atiqur Rahman Ahad. Introduction to Microcontrollers Parts of computer: CPU, memory, I/O CPU: Control and data path Memory:

• Instrumentations: Data collection, oscilloscopes, signal generators, signal analyzers, power supplies.

• Industrial: Elevator controls, surveillance systems, robots.

• Home: Dishwashers, microwave ovens, VCRs, televisions, stereos, fire/security alarm systems, lawn sprinkler controls, thermostats, cameras, clock radios, answering machines.

• Printers, scanners, keyboards, displays, modems, hard disk drives, CD-ROM drives.

Page 13: Microprocessor – Intro! Md. Atiqur Rahman Ahad. Introduction to Microcontrollers Parts of computer: CPU, memory, I/O CPU: Control and data path Memory:

Embedded Rocks!

• Embedded processors account for 100% of worldwide microprocessor production!

• Embedded:desktop = 100:1

Page 14: Microprocessor – Intro! Md. Atiqur Rahman Ahad. Introduction to Microcontrollers Parts of computer: CPU, memory, I/O CPU: Control and data path Memory:

• Embedded Systems is a big, fast growing industry

$ 40 billions in 2000

$92.0 billion in 2008

$112.5 billion (estimated) by the end of 2013• Embedded hardware was worth $89.8 billion in

2008 and is expected to reach $109.6 billion in 2013

• Embedded software generated $2.2 billion in 2008. This should increase to $2.9 billion in 2013

• Microprocessors/Microcontrollers are the core of embedded systems.

Page 15: Microprocessor – Intro! Md. Atiqur Rahman Ahad. Introduction to Microcontrollers Parts of computer: CPU, memory, I/O CPU: Control and data path Memory:

http://www.bccresearch.com/report/embedded-systems-technologies-markets-ift016c.html

Page 16: Microprocessor – Intro! Md. Atiqur Rahman Ahad. Introduction to Microcontrollers Parts of computer: CPU, memory, I/O CPU: Control and data path Memory:

Computer Technology Dramatic Change• Processor

– 2X in speed every 1.5 years; 100X performance in last decade

• Memory– DRAM capacity: 2X / 2 years; 64X size in last decade– Cost per bit: improves about 25% per year

• Disk– capacity: > 2X in size every 1.0 years– Cost per bit: improves about 100% per year– 250X size in last decade

Page 17: Microprocessor – Intro! Md. Atiqur Rahman Ahad. Introduction to Microcontrollers Parts of computer: CPU, memory, I/O CPU: Control and data path Memory:

Computer Technology Dramatic Change!

• State-of-the-art PC (at least…)

– Processor clock speed: 5000 MegaHertz (5.0 GigaHertz)

– Memory capacity: 4000 MegaBytes (4.0 GigaBytes)

– Disk capacity: 2000 GigaBytes (2.0 TeraBytes)

– New units! Mega => Giga, Giga => Tera

(Kilo, Mega, Giga, Tera, Peta, Exa, Zetta, Yotta = 1024)Kilo, Mega, etc. are incorrect Terminologies!

Page 18: Microprocessor – Intro! Md. Atiqur Rahman Ahad. Introduction to Microcontrollers Parts of computer: CPU, memory, I/O CPU: Control and data path Memory:

Microprocessorsare everywherein our life.

Page 19: Microprocessor – Intro! Md. Atiqur Rahman Ahad. Introduction to Microcontrollers Parts of computer: CPU, memory, I/O CPU: Control and data path Memory:

Microcontroller Components – Memory

• Each memory location has a specific address

• We must supply an address to access the corresponding location

• R/W allows us to select reading or writing

• Various types of memory for different functions and speeds

Memory location 0

Memory location 1

Memory location n-1

Memory location n-2

address data

r/w

Page 20: Microprocessor – Intro! Md. Atiqur Rahman Ahad. Introduction to Microcontrollers Parts of computer: CPU, memory, I/O CPU: Control and data path Memory:

Microcontroller Components – Memory

• Read Only Memory - Memory that can only be read– Holds the program code for a microprocessor used in an

embedded system where the code is always the same and is executed every time the system is switched on

– Computer BIOS, boot-up information• Other types of Read Only Memory

– Erasable Programmable Read Only Memory (EPROM) – Similar to ROM but can be erased (exposure to ultraviolet light) and reprogrammed

– Electrically Erasable Programmable Read Only Memory (EEPROM) – more common that EPROM because it can be erased by the microprocessor

– Flash Memory, Ferroelectric RAM (FRAM), Magnetic Random Access Memory (MRAM)

Page 21: Microprocessor – Intro! Md. Atiqur Rahman Ahad. Introduction to Microcontrollers Parts of computer: CPU, memory, I/O CPU: Control and data path Memory:

Microcontroller Components – Memory

• Random Access Memory – used to store dynamic data when processor is running– Holds program code and data during execution – Can be accesses in any random order – unlike takes or disks

• Some types of RAM– Static RAM (SRAM) – Uses transistors to store bits, fast SRAM is used

for cache – Dynamic RAM (DRAM) – Uses capacitors to store bits, must be

refreshed, smaller and cheaper than SRAM• Fast Page Mode (FPM), Extended Data Out (EDO)• Synchrounous DRAM (SDRAM) – introduced in 1997 and replaced most

DRAM in computers by 2000• Double Data Rate (DDR SDRAM) – uses both clock edges found today in

most computers• Direct Rambus DRAM (RDRAM) – somewhat of a flop

Page 22: Microprocessor – Intro! Md. Atiqur Rahman Ahad. Introduction to Microcontrollers Parts of computer: CPU, memory, I/O CPU: Control and data path Memory:

Microcontroller Components – CPU

• Smart part – Processes instructions and data– All the parts of a microprocessor

• Registers – fast memory used to store operands and other information– Condition register –

positive/negative result– Exception register – overflow

condition– Loop count register

• Load-store architecture

Register 0

Register 1

Register n-1

dataaddress

r/w

CPU

ALUinst

Page 23: Microprocessor – Intro! Md. Atiqur Rahman Ahad. Introduction to Microcontrollers Parts of computer: CPU, memory, I/O CPU: Control and data path Memory:

Microcontroller Components – I/O

• Connection to the outside world

• Examples– Analog to Digital Converter– Temperature Sensor– Display– Communications Circuit

Page 24: Microprocessor – Intro! Md. Atiqur Rahman Ahad. Introduction to Microcontrollers Parts of computer: CPU, memory, I/O CPU: Control and data path Memory:

Microcontroller Components – BUS

• Group of wires used to transport information• CPU to Memory

– Address bus– Data bus

• CPU to I/O– Port mapped I/O – used when address space is limited,

special instructions are needed for I/O– Memory mapped I/O – I/O looks like memory

locations, easier to use and common in Reduced Instruction Set Computing (RISC)

Page 25: Microprocessor – Intro! Md. Atiqur Rahman Ahad. Introduction to Microcontrollers Parts of computer: CPU, memory, I/O CPU: Control and data path Memory:

MPU-Based Systems

• System hardware– Discrete components

• Microprocessor, Memory, and I/O

– Components connected by buses• Address, Data, and Control

• System software– A group of programs that monitors the

functions of the entire system

Page 26: Microprocessor – Intro! Md. Atiqur Rahman Ahad. Introduction to Microcontrollers Parts of computer: CPU, memory, I/O CPU: Control and data path Memory:

MPU-Based Time and Temperature System

Page 27: Microprocessor – Intro! Md. Atiqur Rahman Ahad. Introduction to Microcontrollers Parts of computer: CPU, memory, I/O CPU: Control and data path Memory:

MCU-Based Systems

• Includes microprocessor, memory, I/O ports, and support devices (such as timers) on a single semiconductor chip

• Buses are generally not available to a system designer

• I/O ports are generally multiplexed and can be programmed to perform different functions

Page 28: Microprocessor – Intro! Md. Atiqur Rahman Ahad. Introduction to Microcontrollers Parts of computer: CPU, memory, I/O CPU: Control and data path Memory:

MCU-Based Time and Temperature System

Page 29: Microprocessor – Intro! Md. Atiqur Rahman Ahad. Introduction to Microcontrollers Parts of computer: CPU, memory, I/O CPU: Control and data path Memory:

Read -- Computer Architectures

• Princeton versus Harvard Architecture

• CISC versus RISC processors

• Microprocessors and Microcontrollers

Page 30: Microprocessor – Intro! Md. Atiqur Rahman Ahad. Introduction to Microcontrollers Parts of computer: CPU, memory, I/O CPU: Control and data path Memory:

Processor Performance

CPU Time

= # Cycles × Cycle Time

= # Instructions × CPI × Cycle Time

CPI: Cycles per instruction

Page 31: Microprocessor – Intro! Md. Atiqur Rahman Ahad. Introduction to Microcontrollers Parts of computer: CPU, memory, I/O CPU: Control and data path Memory:

Embedded System Programming

• Key factors in embedded programming– Speed – timing constraints, limited processing power– Code size – limited memory, power

• Programming methods– Machine Code – bits – Low level language – assembly– High level language – C, C++, Java– Application level language – Visual Basic, Access

• Levels of abstraction – factor out details to focus on few concepts at a time

Page 32: Microprocessor – Intro! Md. Atiqur Rahman Ahad. Introduction to Microcontrollers Parts of computer: CPU, memory, I/O CPU: Control and data path Memory:

Embedded System Programming

• Why use C in embedded programming?– Ease of management of large embedded projects

– Provides an additional level above assembly programming

– Fairly efficient

– Supports access to I/O

• Why use assembly?– High speed, low code size

– However, difficult to do a large project in assembly

Page 33: Microprocessor – Intro! Md. Atiqur Rahman Ahad. Introduction to Microcontrollers Parts of computer: CPU, memory, I/O CPU: Control and data path Memory:

• From various sources


Recommended