Chapter 1_ World of Microcontrollers - Book_ PIC Microcontrollers - Programming in C
Microcontrollers and intro to real time programming 1
-
Upload
ssgmce-shegaon -
Category
Education
-
view
111 -
download
1
description
Transcript of Microcontrollers and intro to real time programming 1
![Page 1: Microcontrollers and intro to real time programming 1](https://reader036.fdocuments.net/reader036/viewer/2022070304/54be68544a79598c298b45a0/html5/thumbnails/1.jpg)
1
Microcontrollers and Introduction to Real-Time Programming
Prof. Yusuf LeblebiciMicroelectronic Systems Laboratory (LSM)
![Page 2: Microcontrollers and intro to real time programming 1](https://reader036.fdocuments.net/reader036/viewer/2022070304/54be68544a79598c298b45a0/html5/thumbnails/2.jpg)
2
Organization
Introduction
Goals of the Course
Historical Perspective - Microprocessors• Pre-history• Last 30 years• Today and tomorrow
A Few Words on Embedded Systems
The Technology Aspect: Moore’s Law
ITRS Predictions
![Page 3: Microcontrollers and intro to real time programming 1](https://reader036.fdocuments.net/reader036/viewer/2022070304/54be68544a79598c298b45a0/html5/thumbnails/3.jpg)
3
Goals and Objectives
In this course, you will:
Learn how the hardware (HW) and software (SW) components of a microprocessor-based system
work together to implement digital systems.
Learn both HW and SW aspects of integrating digital devices (memory, I/O interfaces, etc.) into microprocessor / microcontroller systems.
Get practical hands-on experience in system design and assembly language programming.
![Page 4: Microcontrollers and intro to real time programming 1](https://reader036.fdocuments.net/reader036/viewer/2022070304/54be68544a79598c298b45a0/html5/thumbnails/4.jpg)
4
Goals and Objectives
Remember: There is always more than one way of looking at things !
Hardware Design
Software Design
![Page 5: Microcontrollers and intro to real time programming 1](https://reader036.fdocuments.net/reader036/viewer/2022070304/54be68544a79598c298b45a0/html5/thumbnails/5.jpg)
5
Goals and Objectives
In the classroom lectures, you will learn more about the hardware architecture aspects of microprocessors andmicrocontrollers, their internal building blocks, operation principles, interfacing with other digital systems etc…
In the laboratory sessions, you will learn more about the machine code and assembly language programming of microprocessors / microcontrollers, and implementation of digital systems using these devices.
![Page 6: Microcontrollers and intro to real time programming 1](https://reader036.fdocuments.net/reader036/viewer/2022070304/54be68544a79598c298b45a0/html5/thumbnails/6.jpg)
6
Goals and Objectives
The classroom lectures will be in English.
The laboratory sessions and exercises will be in French.
There will be regular handouts for reading:
Book chaptersLecture slidesLaboratory manualsetc…
Please follow the lectures regularly – it’s important !
![Page 7: Microcontrollers and intro to real time programming 1](https://reader036.fdocuments.net/reader036/viewer/2022070304/54be68544a79598c298b45a0/html5/thumbnails/7.jpg)
7
Building Blocks of Digital Systems
MEMORY
DATAPATH
CONTROL
INPUT-OUTPUT
Main question: How to implement these functions ?
![Page 8: Microcontrollers and intro to real time programming 1](https://reader036.fdocuments.net/reader036/viewer/2022070304/54be68544a79598c298b45a0/html5/thumbnails/8.jpg)
8
Computer Pre-history
• Charles Babbage
• Analytical Engine• Started in 1834• Never finished
![Page 9: Microcontrollers and intro to real time programming 1](https://reader036.fdocuments.net/reader036/viewer/2022070304/54be68544a79598c298b45a0/html5/thumbnails/9.jpg)
9
Computer History
Eckert and Mauchly
• 1st working electronic computer (1946)
• 18,000 Vacuum tubes
• 1,800 instructions/sec
• 3,000 ft3
![Page 10: Microcontrollers and intro to real time programming 1](https://reader036.fdocuments.net/reader036/viewer/2022070304/54be68544a79598c298b45a0/html5/thumbnails/10.jpg)
10
Computer History
• Maurice Wilkes
1st store program computer
650 instructions/sec
1,400 ft3
http://www.cl.cam.ac.uk/UoCCL/misc/EDSAC99/
EDSAC 1 (1949)
![Page 11: Microcontrollers and intro to real time programming 1](https://reader036.fdocuments.net/reader036/viewer/2022070304/54be68544a79598c298b45a0/html5/thumbnails/11.jpg)
11
1962 - 1972
http://hrst.mit.edu/hrs/apollo/public/index.htm
![Page 12: Microcontrollers and intro to real time programming 1](https://reader036.fdocuments.net/reader036/viewer/2022070304/54be68544a79598c298b45a0/html5/thumbnails/12.jpg)
12
![Page 13: Microcontrollers and intro to real time programming 1](https://reader036.fdocuments.net/reader036/viewer/2022070304/54be68544a79598c298b45a0/html5/thumbnails/13.jpg)
13
Apollo Guidance Computer
![Page 14: Microcontrollers and intro to real time programming 1](https://reader036.fdocuments.net/reader036/viewer/2022070304/54be68544a79598c298b45a0/html5/thumbnails/14.jpg)
14
Word length: 16 bits (15 bits data + parity bit)First computer using integrated circuits (ICs)
Magnetic core memoryFixed memory (ROM): 36,864 wordsErasable memory (RAM): 2,048 words
Number of instructions: 34Cycle time: 11.7 sec Clock frequency: 85 kHz (!)Number of logic gates: 5,600 (2,800 packages)Weight: 30 kgPower consumption: 70 W
Apollo Guidance Computer (AGC)
![Page 15: Microcontrollers and intro to real time programming 1](https://reader036.fdocuments.net/reader036/viewer/2022070304/54be68544a79598c298b45a0/html5/thumbnails/15.jpg)
15
Intel 4004 Microprocessor
• Introduced in 1970– First microprocessor– 4 bit architecture !
• 2,250 transistors• 12 mm2
• Clock: 108 kHz
![Page 16: Microcontrollers and intro to real time programming 1](https://reader036.fdocuments.net/reader036/viewer/2022070304/54be68544a79598c298b45a0/html5/thumbnails/16.jpg)
16
Intel 8085 Microprocessor
• Introduced in 1974• 8-bit architecture• Still used in some
microcontroller applications !
![Page 17: Microcontrollers and intro to real time programming 1](https://reader036.fdocuments.net/reader036/viewer/2022070304/54be68544a79598c298b45a0/html5/thumbnails/17.jpg)
17
Intel 8086 Microprocessor
• Introduced in 1979• 29,000 transistors• 33 mm2
• Clock: 5 MHz• 16 bit architecture
![Page 18: Microcontrollers and intro to real time programming 1](https://reader036.fdocuments.net/reader036/viewer/2022070304/54be68544a79598c298b45a0/html5/thumbnails/18.jpg)
18
Intel 386 Microprocessor
• Introduced in 1985• 275,000 transistors• 43 mm2
• Clock: 16 MHz• 32 bit architecture
![Page 19: Microcontrollers and intro to real time programming 1](https://reader036.fdocuments.net/reader036/viewer/2022070304/54be68544a79598c298b45a0/html5/thumbnails/19.jpg)
19
Intel 486 Microprocessor
• Introduced in 1989• 1,200,000 transistors• 81 mm2
• Clock: 25 MHz• 32 bit architecture
– 1st pipelined implementation of IA32
![Page 20: Microcontrollers and intro to real time programming 1](https://reader036.fdocuments.net/reader036/viewer/2022070304/54be68544a79598c298b45a0/html5/thumbnails/20.jpg)
20
Intel Pentium Microprocessor
• Introduced in 1993• 3,100,000 transistors• 296 mm2
• Clock: 60 MHz• 32 bit architecture
– 1st superscalar implementation of IA32
![Page 21: Microcontrollers and intro to real time programming 1](https://reader036.fdocuments.net/reader036/viewer/2022070304/54be68544a79598c298b45a0/html5/thumbnails/21.jpg)
Pentium Processor Details
• State– Registers– Memory
• Control ROM
• Combinational logic
REG
![Page 22: Microcontrollers and intro to real time programming 1](https://reader036.fdocuments.net/reader036/viewer/2022070304/54be68544a79598c298b45a0/html5/thumbnails/22.jpg)
22
Intel Pentium III
• Introduced in 1999• 9,500,000 transistors• 125 mm2
• Clock: 450 MHz• 32 bit architecture
![Page 23: Microcontrollers and intro to real time programming 1](https://reader036.fdocuments.net/reader036/viewer/2022070304/54be68544a79598c298b45a0/html5/thumbnails/23.jpg)
23
DEC Alpha 21264
• Introduced in 1998• 15,200,000 transistors• 302 mm2
• Clock: 700 MHz• 64 bit architecture• Still the highest performance
commercial microprocessor:
SPEC-95fp
Alpha 21264: 66Pentium III Xeon: 30.4
![Page 25: Microcontrollers and intro to real time programming 1](https://reader036.fdocuments.net/reader036/viewer/2022070304/54be68544a79598c298b45a0/html5/thumbnails/25.jpg)
25
Don’t think that the highest-performance processors are always found in a computer !!
• Sony Playstation II• Chip designed by Toshiba• Introduced in 1998• 10,500,000 transistors• 238 mm2
• Clock: 300 MHz• 128 bit architecture• 10 floating-point multiplier
accumulators• MPEG-2 decoder• Multimedia processor
![Page 26: Microcontrollers and intro to real time programming 1](https://reader036.fdocuments.net/reader036/viewer/2022070304/54be68544a79598c298b45a0/html5/thumbnails/26.jpg)
26
Embedded SystemsAbout four (!) percent of the world’s microprocessors are used in computers. Source: Embedded Systems Programming, May 1999
Average car has about 15 microprocessors. Mercedes S-class: 63 microprocessors !!
32-bit
embeddedmicroprocessors
16-bit
8-bit
8-bit
250 million
1 billion
1 billion
1 billion
125 million PCsIntel, AMD
Motorola,ARM,MIPS,i960,x86,…
Only 4% of thetotal number
![Page 27: Microcontrollers and intro to real time programming 1](https://reader036.fdocuments.net/reader036/viewer/2022070304/54be68544a79598c298b45a0/html5/thumbnails/27.jpg)
27
New Direction: System-on-Chip (SoC)
ASIC CoreMemory
Embedded ProcessorCore
AnalogFunctions
Com
mun
icat
ion
SensorInterface
![Page 28: Microcontrollers and intro to real time programming 1](https://reader036.fdocuments.net/reader036/viewer/2022070304/54be68544a79598c298b45a0/html5/thumbnails/28.jpg)
28
Building Blocks of Digital Systems
MEMORY
DATAPATH
CONTROL
INPUT-OUTPUT
Main question: How to implement these functions ?
CPU
![Page 29: Microcontrollers and intro to real time programming 1](https://reader036.fdocuments.net/reader036/viewer/2022070304/54be68544a79598c298b45a0/html5/thumbnails/29.jpg)
29
Bus and CPUBus: A shared group of wires used for communicating
signals among devices
• address bus: the device and the location within the device that is being accessed• data bus: the data value being communicated• control bus: describes the action on the address and data
buses
CPU: Core of the processor, where instructions are executed
• High-level language: a = b + c• Assembly language: add r1 r2 r3• Machine language: 0001001010111010101
![Page 30: Microcontrollers and intro to real time programming 1](https://reader036.fdocuments.net/reader036/viewer/2022070304/54be68544a79598c298b45a0/html5/thumbnails/30.jpg)
30
Memory and I/O
Memory: Where instructions (programs) and data are stored• Organized in arrays of locations (addresses), each storing one byte (8 bits) in general• A read operation to a particular location always returns the last value stored in that location
I/O devices: Enable system to interact with the world
• Device interface (a.k.a. controller or adapter) hardware connects actual device to bus• The CPU views the I/O device registers just like memory that can be accessed over the bus. However, I/O registers are connected to external wires, device control logic, etc.• Reads may not return last value written• Writes may have side effects
![Page 32: Microcontrollers and intro to real time programming 1](https://reader036.fdocuments.net/reader036/viewer/2022070304/54be68544a79598c298b45a0/html5/thumbnails/32.jpg)
32
![Page 33: Microcontrollers and intro to real time programming 1](https://reader036.fdocuments.net/reader036/viewer/2022070304/54be68544a79598c298b45a0/html5/thumbnails/33.jpg)
33
YEAR 2002 2005 2008 2011 2014
TECHNOLOGY 130 nm 100 nm 70 nm 50 nm 35 nm
CHIP SIZE 400 mm2 600 mm2 750 mm2 800 mm2 900 mm2
NUMBER OFTRANSISTORS(LOGIC)
400 M 1 Billion 3 Billion 6 Billion 16 Billion
DRAMCAPACITY
2 Gbits 10 Gbits 25 Gbits 70 Gbits 200 Gbits
MAXIMUMCLOCKFREQUENCY
1.6 GHz 2.0 GHz 2.5 GHz 3.0 GHz 3.5 GHz
MINIMUMSUPPLYVOLTAGE
1.5 V 1.2 V 0.9 V 0.6 V 0.6 V
MAXIMUMPOWERDISSIPATION
130 W 160 W 170 W 175 W 180 W
MAXIMUMNUMBER OFI/O PINS
2500 4000 4500 5500 6000
ITRS - International Technology Roadmap for Semiconductors
Predictions of the worldwide semiconductor / IC industry about its own future prospects...
![Page 34: Microcontrollers and intro to real time programming 1](https://reader036.fdocuments.net/reader036/viewer/2022070304/54be68544a79598c298b45a0/html5/thumbnails/34.jpg)
34
YEAR 2002 2005 2008 2011 2014
TECHNOLOGY 130 nm 100 nm 70 nm 50 nm 35 nm
CHIP SIZE 400 mm2 600 mm2 750 mm2 800 mm2 900 mm2
NUMBER OFTRANSISTORS(LOGIC)
400 M 1 Billion 3 Billion 6 Billion 16 Billion
DRAMCAPACITY
2 Gbits 10 Gbits 25 Gbits 70 Gbits 200 Gbits
MAXIMUMCLOCKFREQUENCY
1.6 GHz 2.0 GHz 2.5 GHz 3.0 GHz 3.5 GHz
MINIMUMSUPPLYVOLTAGE
1.5 V 1.2 V 0.9 V 0.6 V 0.6 V
MAXIMUMPOWERDISSIPATION
130 W 160 W 170 W 175 W 180 W
MAXIMUMNUMBER OFI/O PINS
2500 4000 4500 5500 6000
Shrinking Device Dimensions
![Page 35: Microcontrollers and intro to real time programming 1](https://reader036.fdocuments.net/reader036/viewer/2022070304/54be68544a79598c298b45a0/html5/thumbnails/35.jpg)
35
YEAR 2002 2005 2008 2011 2014
TECHNOLOGY 130 nm 100 nm 70 nm 50 nm 35 nm
CHIP SIZE 400 mm2 600 mm2 750 mm2 800 mm2 900 mm2
NUMBER OFTRANSISTORS(LOGIC)
400 M 1 Billion 3 Billion 6 Billion 16 Billion
DRAMCAPACITY 2 Gbits 10 Gbits 25 Gbits 70 Gbits 200 Gbits
MAXIMUMCLOCKFREQUENCY
1.6 GHz 2.0 GHz 2.5 GHz 3.0 GHz 3.5 GHz
MINIMUMSUPPLYVOLTAGE
1.5 V 1.2 V 0.9 V 0.6 V 0.6 V
MAXIMUMPOWERDISSIPATION
130 W 160 W 170 W 175 W 180 W
MAXIMUMNUMBER OFI/O PINS
2500 4000 4500 5500 6000
Increasing Function Density
![Page 36: Microcontrollers and intro to real time programming 1](https://reader036.fdocuments.net/reader036/viewer/2022070304/54be68544a79598c298b45a0/html5/thumbnails/36.jpg)
36
YEAR 2002 2005 2008 2011 2014
TECHNOLOGY 130 nm 100 nm 70 nm 50 nm 35 nm
CHIP SIZE 400 mm2 600 mm2 750 mm2 800 mm2 900 mm2
NUMBER OFTRANSISTORS(LOGIC)
400 M 1 Billion 3 Billion 6 Billion 16 Billion
DRAMCAPACITY
2 Gbits 10 Gbits 25 Gbits 70 Gbits 200 Gbits
MAXIMUMCLOCKFREQUENCY
1.6 GHz 2.0 GHz 2.5 GHz 3.0 GHz 3.5 GHz
MINIMUMSUPPLYVOLTAGE
1.5 V 1.2 V 0.9 V 0.6 V 0.6 V
MAXIMUMPOWERDISSIPATION
130 W 160 W 170 W 175 W 180 W
MAXIMUMNUMBER OFI/O PINS
2500 4000 4500 5500 6000
Increasing Clock Frequency
![Page 37: Microcontrollers and intro to real time programming 1](https://reader036.fdocuments.net/reader036/viewer/2022070304/54be68544a79598c298b45a0/html5/thumbnails/37.jpg)
37
YEAR 2002 2005 2008 2011 2014
TECHNOLOGY 130 nm 100 nm 70 nm 50 nm 35 nm
CHIP SIZE 400 mm2 600 mm2 750 mm2 800 mm2 900 mm2
NUMBER OFTRANSISTORS(LOGIC)
400 M 1 Billion 3 Billion 6 Billion 16 Billion
DRAMCAPACITY
2 Gbits 10 Gbits 25 Gbits 70 Gbits 200 Gbits
MAXIMUMCLOCKFREQUENCY
1.6 GHz 2.0 GHz 2.5 GHz 3.0 GHz 3.5 GHz
MINIMUMSUPPLYVOLTAGE
1.5 V 1.2 V 0.9 V 0.6 V 0.6 V
MAXIMUMPOWERDISSIPATION
130 W 160 W 170 W 175 W 180 W
MAXIMUMNUMBER OFI/O PINS
2500 4000 4500 5500 6000
Decreasing Supply Voltage
![Page 38: Microcontrollers and intro to real time programming 1](https://reader036.fdocuments.net/reader036/viewer/2022070304/54be68544a79598c298b45a0/html5/thumbnails/38.jpg)
38
![Page 39: Microcontrollers and intro to real time programming 1](https://reader036.fdocuments.net/reader036/viewer/2022070304/54be68544a79598c298b45a0/html5/thumbnails/39.jpg)
39
![Page 40: Microcontrollers and intro to real time programming 1](https://reader036.fdocuments.net/reader036/viewer/2022070304/54be68544a79598c298b45a0/html5/thumbnails/40.jpg)
40
![Page 41: Microcontrollers and intro to real time programming 1](https://reader036.fdocuments.net/reader036/viewer/2022070304/54be68544a79598c298b45a0/html5/thumbnails/41.jpg)
41
Some Interesting WWW Links
• Great Microprocessors of the Past and Presenthttp://www3.sk.sympatico.ca/jbayko/cpu.html
• CPU Info Centerhttp://bwrc.eecs.berkeley.edu/CIC/
• CPU Design HOW-TOhttp://www.linuxdoc.org/HOWTO/CPU-Design-HOWTO.html
• VLSI Microprocessorshttp://www.microprocessor.sscc.ru/
• Molecular Expressions Chip Shots Galleryhttp://micro.magnet.fsu.edu/chipshots/index.html