microprocessors and controllers
DESCRIPTION
history of processor from the start till nowTRANSCRIPT
Copyright © 2008 Heathkit Company, Inc. All rights reserved.
Unit 2
CPUs and Microprocessor
2
CPU Components
3
Objectives• Describe the components that make
up a CPU.
• Demonstrate the purpose of a CPU clock.
• Discuss how the clock determines CPU speed.
• Explain the purpose of an instruction set.
4
CPUCPU
Pentium 4 CPU
5
TransistorsTransistors
6
ResistorsResistors
7
Color CodesColor
First Band
Second Band
Third Band (optional)
Fourth Band (multiplier)
Tolerance Band
Black 0 0 0 1
Brown 1 1 1 10
Red 2 2 2 100
Orange 3 3 3 1,000
Yellow 4 4 4 10,000
Green 5 5 5 100,000
Blue 6 6 6 1,000,000
Violet 7 7 7 (silver) .01 (silver) 10%
Gray 8 8 8 (gold) .1 (gold) 5%
White 9 9 9 (brown) 1%
8
PotentiometersPotentiometers
9
CapacitorsCapacitors
10
More CapacitorsMore Capacitors
11
IC’s - DIP styleIC’s - DIP style
12
The Clock
14.318 MHzCrystal
BIOS
System Clock
Clock Chip
13
Instruction Sets
• Every CPU is controlled by a set of instructions.
• Instruction sets tell the CPU where to find data, when to read the data, and what to do with the data.
14
• Describe the components that make up a CPU.
• Demonstrate the purpose of a CPU clock.
• Discuss how the clock determines CPU speed.
• Explain the purpose of an instruction set.
15
Intel Processors
16
Objectives• Describe the main factors used to
compare CPU performance.
• Develop an understanding of earlier processors, and how processors have evolved through the years.
• Describe how the Pentium family of CPUs evolved.
• Describe the basic structure of today’s dual-core CPUs.
17
In the Beginning
• 4004 by Intel in 1971
• Designed as the core logic of a calculator
• Handled data 4 bits at a time
• Ran at 108 KHz
• 2300 transistors
• Memory: 640 bytes
18
8008• Date Introduced April 1972
• Number of Transistors 3,500
• Internal Register Size 8-bits
• Data I/O Bus Width 8-bits
• Maximum Memory 16 KB
• Typical Speed 0.2 MHz
Intel 4040
• Updated version of 4004
• 4 bit microprocessor
19
20
8080• Date Introduced April 1974
• Number of Transistors 6000
• Int Register Size 8-bits
• Data I/O Bus Width 8-bits
• Maximum Memory 64 KB
• Typical Speed 2 MHz
• Used in Altair microcomputer
21
8088• Date Introduced June 1979
• Number of Transistors 29,000
• Int Register Size 16 bits
• Data I/O Bus Width 8 bits
• Maximum Memory 1 MB
• Typical Speed 8 MHz
• External bus 8 bits
• 40- pin DIP
22
The 8088 was used in the first IBM
Personal Computer
Intel 80186
• 80186 was developed, but it was not used in any significant computers.
23
24
80286• Date Introduced May 1982
• Number of Transistors 134,000
• Int Register Size 16 bits
• Data I/O Bus Width 16 bits
• Maximum Memory 16 MB
• Typical Speed 12 MHz
25
80386• Date Introduced Oct. 1985
• Number of Transistors 275,000
• Internal Register Size 32 bits
• Data I/O Bus Width 32 bits
• Maximum Memory 4 GB
• Typical Speed 16/20/25/33 MHz
• The fist processor to be packaged in a PGA
26
80386sx
• Int Register Size 32-bits
• Data I/O Bus Width 16-bits
• Typical Speed 16/20/25/33 MHz
• 386sx was a 386 on the inside but a 286 on the outside
• 16 bit motherboard
• Inexpensive alternative of 80386
27
Math Coprocessors
• Fast circuits to perform floating point math
• For 8088 through 80386, a separate device
• As complicated as the CPU itself
Math coprocessor
• The math coprocessor is a special circuit designed to perform floating point arithmetic.
• Floating point refers to fractional numbers and exponents as opposed to only integer or whole numbers.
• Initially, the math coprocessor was a separate integrated circuit because its complexity approached that of the microprocessor itself.
28
29
CPU and Coprocessor
8088 8087
80286 80287
80386 80387
30
80486not all 486 family has a coprocessor
• Date Introduced April 1989
• Transistors 1,200,000
• Int Register Size 32-bits
• Bus Width 32-bits
• Max Memory 4 GB
• Typical Speed 66 MHz
• L1 Internal Cache 8 KB
• Math Coprocessor Internal
31
Internal Cache
• A small memory inside the CPU that runs at the same speed as the CPU
• Also called an L1 cache
32
Pentium®
• Date Introduced March 1993
• Transistors 3,100,000
• Int Register Size 32-bits
• Data I/O Bus Width 64-bits
• Maximum Memory 4 GB
• Typical Speed 100 MHz
• L1 Internal Cache 2×8 KB
• Internal Coprocessor Yes
33
0 5 10 15 20 25
8088
80286
80386
80486
Pentium
Number of clock cycles needed to execute a typical instructionNumber of clock cycles needed to execute a typical instruction
34
35
Pentium Pro®
• Date Introduced November 1995
• Transistors 5,500,000
• Internal Register Size 32 bits
• Data I/O Bus Width 64 bits
• Maximum Memory 64 GB
• Typical Speed 200 MHz
• L1 Internal Cache 2×8 KB
• Math Coprocessor Yes
• L2 Cache 256 KB
36
Micro-processor
Micro-processor
256 KBCache
256 KBCache
Pentium Pro®
37
Pentium MMX• Date Introduced January 1997• Transistors 4,100,000• Internal Register Size 32 bits• Data I/O Bus Width 64 bits• Maximum Memory 4 GB• Typical Speed 200 MHz• L1 Internal Cache 2×16 KB• Math Coprocessor Yes• MMX Instructions Yes
38
39
Pentium II®
• Date Introduced May 1997• Number of Transistors 7,500,000• Int Register Size 32 bits• Data I/O Bus Width 64 bits• Maximum Memory 64 GB• Typical Speed 300 MHz• L1 Internal Cache 2×16 KB• Math Coprocessor Yes• L2 Cache 512 KB
40
Pentium II Single Edge Contact (SEC) Cartridge
41
Pentium IIProcessor
Pentium IIProcessor
CacheMemoryCache
MemoryCache
MemoryCache
Memory
Internal View (Front)
42
Pentium IISEC
Cartridge
Pentium IISEC
Cartridge
Heat Sink
Heat Sink
FanFan
43
Pentium III®
• 0.25 Micron Technology
• 450 MHz to 1.4 GHz
• 1.8V core voltage
• Dissipates less heat
• Supports multi-processing
44
45
Pentium 4®
• 0.18, 0.13, 0.09 Micron Technology
• 1.3 GHz to 4 GHz and higher
• 1 V to 1.8 V core voltage
• Dissipates lots of heat (up to 100 W)
• Supports multi-processing
Pentium 4
46
47
Heat Sink
Heat Sink
FanFan
48
CeleronCeleron
Menu
Celeron• Low end processor
• It has no cover
• No heat sink
• Originally it has no L2 cache
• It is intended to compete to AMD and Cyrix for low end processor market.
• The performance is near with the pentium.
49
50
Pentium M®
• The Pentium M uses the core processor from the Pentium III with the interface bus of a Pentium 4.
• M-mobile processor
• Operates at very low power levels.
• Produce less heat.
• 32 bit processor
• Uses the X86 instruction sets
• Run faster than Pentium 4
51
Pentium D®
• Pentium D begins to concentrate on power efficiency and the number of cores in the processor instead of raw clock speed.
• D - Dual core processor
• Bus speeds exceed 500MHz while clock speeds are between 2.66 GHz and 3.73GHz
52
Itanium
• Entirely new design.
• Primarily for servers and other expensive and high-performance systems.
• Runs several processes in parallel.
• 64 bit processor
• Run only on g4 bit operating system
• Run several processes in parallel
53
Core Duo• The Core Duo has many internal
performance and efficiency improvements over the Pentium D.
• Processor is identical with Pentium D
• It has better memory bus management and new instructions available to the operating system and application.
• 32 bit micro architecture CPUs for laptops
• 64 bit micro architecture for desktop computing.
54
Core 2 Duo• Core 2 Duo provides:
– Better operational efficiencies between its two cores.
– Adds over two megabytes of cache RAM to each of the core processors.
– Operates at half the power of the Pentium D.
– Popular for portable computers because they provide a huge performance increase at virtually no power increase of loss in battery life.
55
56
Core 2 Quad• The Core 2 Duo products
contain two separate Core 2 dies.
• Effectively doubles the processor capabilities, it also doubles the power consumed and the heat that is radiated by the CPU.
57
Core i3 series• Remain dual core
• Main feature of i3Turbo Boostdynamic over clocking
• Lack of technology virtualization
• Lack of encryption acceleration technology
• Allow hyperthreading
- This is Intel's logic-core duplication technology which allows each physical core to be used as two logic cores.
- The result of this is that Windows will display a dual-core Core i3 processor as if it were a quad-core.
58
59
• Core i3 processors have their integrated graphics processor restricted to a maximum clock speed of 1100 MHz, and all Core i3 processors have the 2000 series IGP, which is restricted to 6 execution cores.
60
Core i5 Series• Core i5 is split into two
- dual core
- quad core
• Turbo Boost
• and they all lack Hyper-Threading.
• substantial difference between the Core i5 options is the clock speed, which ranges from 2.8 GHz to 3.3 GHz.
• dual-core Core i5 called the 2390T.
61
62
Core i7 series• These processors are virtually identical to the Core
i5.
• 100 MHz higher base clock speed,
• real feature difference is the addition of hyper-threading
• which means that the processor will appear as an 8-core processor in Windows.
• can result in a substantial boost if you're using a program that is able to take advantage of 8 threads.
• IGP on Core i7 processors can also reach a higher maximum clock speed of 1350 MHz.
63
64
65
AMD Processors
AMD’s K6-2AMD’s K6-2
66
Multicore, Multithreading,
and Multitasking
67
Objectives
• Explain the difference between multitasking and multiprocessing.
• Explain the difference between multithreading and multiprocessing.
• List several disadvantages of achieving multiprocessing by using multiple MPU packages.
• Explain the difference between cooperative and preemptive multitasking.
68
• Explain the difference between symmetrical and asymmetrical multiprocessing.
• Discuss the internal structure of the Pentium D, Core 2 Duo, and Core 2 Quad microprocessors.
69
“Multi” — More than what?
• Multitasking
• Multithreaded
• Multiprocessing
• Multicore
70
Multitasking• The apparent simultaneous execution of
two or more programs by a single processor.
• What appears to be simultaneous execution is actually concurrent execution.
• Dates back to the earlier days of Windows.
71
Think of Multitasking this way.
Program 1
Program 2
Processor
72
Two types of Multitasking
• Cooperative
• Preemptive
73
Cooperative Multitasking
Program 1
Program 2
ProcessorThe Applications control the switching.
74
Preemptive Multitasking
Program 1
Program 2
Processor
The operating system controls the switching.
75
Multitasking
Program 1
Program 2
Processor
76
• A single Program or Application can be written so that it can be executed as two or more “threads” of instructions.
• A “thread” can be thought of as a stand alone task.
• For example, in a video processing application the video information could be processed as one thread; the audio as another.
Multithreaded
77
Think of Multithreading this way.
Thread 1
Thread 2
ProcessorApplication
78
Multithreading a Video Processing Application
Thread 1(Video)
Thread 2Audio
Processor
Application
VideoVideo Audio
79
Threads
• Threads occur within a single application.
• The application must be written for Multithreading.
• Not all applications lend themselves to this form of parallelization.
• The processor must support multithreading.
• Not all processors do.
80
Pentium 4 was optimized for multithreading.
LogicalCore 1
Pentium 4
LogicalCore 2
Thread 1
Thread 2
Thread 1 Thread 2 Thread 1
81
Pentium D
Pentium 4
Pentium 4
82
Multiprocessing• A single computer runs two (or more)
separate programs at the same time.
• Servers and workstations achieved this by using multiple processors in separate packages.
• PCs achieve this by using multiple cores in a single package.
83
Types of Multiprocessing (MP)
• Symmetrical MP—The operating system assigns tasks as it sees fit.
• Asymmetrical MP—The program designer chooses the processor at the time the program is written.
84
Dual Package versus dual core.
CPU IC 2
Sockets 2
Heat sinks 2
Fans 2
Fan cable 2
Board Space X2
Dual Packages
CPU IC 1
Sockets 1
Heat sinks 1
Fans 1
Fan cable 1
Board space X1
Dual Core
85
Enter the Core 2 Duo• Because the Pentium D was made up of
two Pentium 4 cores, it was not optimized for dual processing.
• Intel redesigned the architecture of the CPU, optimizing it for multiprocessing.
• The result is called “Core” architecture. Apparently, this is a new trade name that replaces “Pentium”.
• One of the early processors to use this new architecture is the Core 2 Duo.
86
Core 2 Design
87
The Core 2 Extreme
• Fastest of the Core 2 Duo series
• Allows “over-clocking”, a technique that allows users to run the CPU at a higher clock speed than the manufacture recommends.
88
The Core 2 Quad
First Core 2 Die Second Core 2 Die
89
The Core 2 Quad
Single Core 2 Quad Die
90
• Explain the difference between multitasking and multiprocessing.
• Explain the difference between multithreading and multiprocessing.
• List several disadvantages of achieving multiprocessing by using multiple MPU packages.
• Explain the difference between cooperative and preemptive multitasking.
91
• Explain the difference between symmetrical and asymmetrical multiprocessing.
• Discuss the internal structure of the Pentium D, Core 2 Duo, and Core 2 Quad microprocessors.
92
Microcontrollers(Embedded Microprocessors)
93
Microcontroller versus general-purpose microprocessors
• General-purpose microprocessors are processors like the Intel’s x86 family (8086, 80286, 80386, 80486, and the Pentium) or the Motorola’s 680x0 family (68000, 68010, 68020, 69030, 68040, etc. These microprocessor do not contain A RAM, ROM nor I/O ports on the chips themselves. They are general-purpose processors.
94
• They have a CPU, RAM, ROM, I/O Ports and a Timer(s) on a single chip. These items are in embedded on the chip.
MICROCONTROLLERS
95
Microcontrollers for embedded systems
• Microprocessor and microcontrollers are widely used in embedded systems products. An embedded project uses a microprocessor (or microcontroller) to do one task only.
• Example – A printer is an embedded system that does one task, get data and print it.
96
EMBEDDED PRODUCTS USING
MICROCONTROLLERS
• Home – Appliances, Intercom, Telephone, Security systems, Garage door openers, Answering machine, Fax machines, TVs, VCRs, Camcorders, Remote controls, Video games, Cellular phones, Musical instruments, Sewing Machines, Lighting control, Paging Camera, Pinball Machine, Toys…etc.
• Office – Computers, Security systems, Fax machines, Microwaves, Copiers, Laser printers, Color printers, and Paging.
• Automobiles – Trip computer, Engine control, Air Bag, ABS, Cellular Phone, Instrumentation, Security system Keyless entry, Climate control.
97
• Very Often the terms embedded processor and microcontroller are used interchangeably.
• Most critical needs of an embedded system is to decrease power consumption and space.
98
• Most default microprocessor manufacturers are targeting their microprocessors for the high-end of the embedded market by integrating more functions into the CPU chip.
99
CHOOSING A MICROCONTROLLER
• There are four (4) major 8 bit microcontrollers. They are:
Freescale’s 6811
Intel’s 8051
Zilog’s Z8
PIC 16X from Microchip Technology.
100
• Each of the microcontrollers have an unique instruction and register set.
• They are not compatible with each other.
• There some 16 bit and 32 bit microcontroller made by various chip makers.
101
Criteria for Choosing a Microcontroller
• There are three (3) criteria's for a microcontroller.
• 1. Meeting the computing needs of the task at hand efficiently and cost effectively.
• 2. Availability of software development tools such as compliers
102
• Assemblers, and debuggers.
• 3. Wide availability and reliable sources of the microcontroller.
103
First Criteria – Computing Needs
• 8 bit, 16 bit or 32 bit microcontroller
• Speed of chip
• Packaging – 40 DIP or Quad flat Package (QFP)
• Power Consumption – critical for battery-powered products
104
First Criteria – Computing Needs
• Amount of RAM and ROM on chip.
• Number of I/O pins and timer on chip.
• Ease of upgrading to higher-performance or lower power-consumption versions.
• Cost per unit – Example 50 cent per unit when purchased 100,000 units at a time.
105
Second Criteria-Ease of Developing Products
• Availability of an assembler, debugger, Code efficient C Language complier, emulator, technical support, and in - house and outside expertise.
106
Third Criteria – Availability in Need Quantities Now and in the
Future
• Now Intel’s 8051 8 bit microcontroller family has the largest number of diversified (Microcontrollers) suppliers.
• There presently several companies that have licenses to produce the 8051 microprocessor. Some are:
107
• Company
• Intel www.intel.com/design/mcs51
• Atmel www.atmel.com
• Philips/Signetics www.semiconductors.
• Philips.com
• Infineon www.infinecon.com
• Dallas Semi/Maxim-www.maxim-ic
108
8051 Microcontroller Family
• Consist of three (3) different chips:
• 8051
• 8052
• 8032
109
8051 Microcontroller
• Introduced by Intel in 1981.
• The chip included 128 bytes of RAM, 4K bytes of on-chip ROM, two timers. One serial port, four 8 bit wide ports.
• It is referred to as a “system on a chip”.
• It is a 8 bit chip.
110
8052 Microcontroller
• It has all of the standards features of the 8051 as well as an extra 128 bytes of RAM and a extra timer.
• In other words the 8052 has 256 bytes of RAM, and three (3) timers. It also has 8K bytes of on-chip ROM instead of 4K.
111
8031 Microcontroller
• Often referred to as the ROM less 8051, since it does not any on-chip ROM.
• External ROM will have to be used with this chip through two of the on-chip (8 bit) ports.
112
Various 8051 Microcontrollers
• 8051 is the most popular chip, but it comes in different memory types, so the part numbers will not be “8051.”
• Memory Types: UV-EPROM, FLASH AND NV-RAM.
113
8751 Microcontroller
• Has only 4K bytes of on-chip UV-EPROM.
• Requires access to PROM burner and has to be erased prior to repro-gramming. Can be erased in seconds, but programming needs 20 or more minutes to program.
114
DS89C4X0 Microcontroller
• The Dallas Semiconductor/Maxim version of the 8052.
• Has flash memory, comes with on-chip loader that allows the program to be loaded in to the flash ROM through the serial port of a IBM PC.
115
DS5000 Microcontroller
• The Dallas Semiconductor NV-RAM version of the 8051.
• Advantage – has the ability to change the ROM contents one byte at a time.
• Has a loader, allowing it to be loaded through the PC’s port.
116
AT89C51 from Atmel Corp
• Atmel has a wide selection of 8051s.
• AT89C51, 4K ROM, 128 Byte RAM, 2 Timers, 6 Interrupts, 32 I/O pins.
• AT89LV51, 4K ROM, 128 Byte RAM,32 I/O pins.
• AT89C1051, 1K ROM, 64 Byte RAM, 1 Timer, 15 I/O pins.
117
• AT89C2051, 2K ROM, 128 RAM, 2 Timers, 15 I/O pines.
• AT89C52, 8K ROM, 128 Byte RAM, 3 Timers, 32 I/O pins.
• AT89LV52, 8K ROM, 128 Byte RAM, 3 Timers, 32 I/O pins.
118
OTP Version of the 8051Microcontroller
• OTP (One Time Programmable) versions of the 8051 is available from different sources.
• Flash and NV-RAM versions typically used in the product development.
• OTP version is used for mass production, since it is cheaper per unit.
119
8051 family from Philips
• Have the largest selections of 8051 microcontrollers.
• Features includes: A-toD and D-A-C converters, extended I/O ports and both OTP and Flash.
120
SUMMARY
121