lec 1 microprocessor and microcontroller

Click here to load reader

Upload: muhammad-qasim

Post on 24-Oct-2015

97 views

Category:

Documents


4 download

DESCRIPTION

helpfull doc

TRANSCRIPT

Microprocessor and Microcontroller Spring 2013

Lecture 1: Introduction

Muhammad Saqib BhattiMicroprocessor and MicrocontrollerSpring 2013COURSE SUPERVISORMUHAMMAD SAQIB BHATTIBachelors Degree in Telecommunication engineering (NUCES-FAST).Graduated in 2008Masters Degree in Electronics Engineering (University of Portsmouth UK).Cisco, Juniper and Huawei certified Network Professional in Routing and Switching.Worked as a Network Engineer in Virgin Media UK and Interactive Convergence Islamabad.

Course Details Total Credit hours : 4Lecture TimingsWednesday : 9:35 - 11:05 (75 mins)Friday : 9:35 - 11:05 (75 mins)Lab Session : Tuesday : 1:15 - 2:45

Text BooksPre- Requisites : Computer Architecture

Text Books:Microprocessor and Microcontrollers, Krishna Kant Eastern Company Edition, Prentice Hall of India, New Delhi , 2007. Muhammad Ali Mazidi & Janice Gilli Mazidi, R.D.Kinely The 8051 Micro Controller and Embedded Systems, PHI Pearson Education, 5th Indian reprint, 2003.

Other ReferencesR.S. Gaonkar, Microprocessor Architecture Programming and Application, Wiley Eastern Ltd., New Delhi.The 8088 & 8086 Microprocessors , Walter A Tribal & Avtar Singh, Pearson, 2007, Fourth Edition Some of the topics would be covered from other books and would be provided on need to know basis.

GradingThe final Grade will be determined from a weighted average of assignments, quizzes, project and exams as follows.Quizzes5%Assignments 5%Labs + Project20%Midterm Exam I & II 20 %Final Exam50 %

Lab ProjectLab Project would be weighted approximately 10% (after consultation with the Lab supervisor)A final lab project will last 3-4 weeks. Projects will be self-selected or supervisor allocated would be told in the next Lecture.Project would be designing scenario.Course Objective to develop an in-depth understanding of the operation of microprocessors and microcontrollers machine language programming microprocessor interfacing techniques to be able to use 8051 microcontroller competently to be able to design and implement microprocessor-based systems in both hardware and software to be able to apply this knowledge to more advanced structuresAt the high end of the scale

Processor: Intel Pentium 4Frequency: 3.2GHzPower consumption: 103 W max.*Process: 90nm

*Intel document no. 300561-002The top of the line G5 PowerMac has 9 fans in it, in four separate cooling zones, with 21 temperature sensors.

Biggest problem is actually getting heat OFF the die and into a sink to a fan. People use layers of goop or grease in the interface. All kinds of exotic solutions are creeping up like MEMS, tiny pumps with fluid, evaporation, etc.At the low end of the scaleProcessor can consume no more than 250-300mW

Embedded Devices

Where are the embedded devices?Mention the ubiquity of handheld devices and things that run on one batteryCourse Objective to develop an in-depth understanding of the operation of microprocessors and microcontrollers machine language programming microprocessor interfacing techniques to be able to use 8051 microcontroller competently to be able to design and implement microprocessor-based systems in both hardware and software to be able to apply this knowledge to more advanced structuresEvolution of Microcontrollers1947 :- Invention of Transirstos

1959 :- Invention of Integrated Cicuits

1965 :- Birth of Moores Law

1971 :- Development of Microprocessors

1976 :- Inroduction of MirocontrollersTransistorsTransistors can be regarded as a type of switch, as can many electronic components. They are used in a variety of circuits and you will find that it is rare that a circuit built in a school Technology Department does not contain at least one transistor. They are central to electronics.Vacuum Tubes were used before transistors but they were bulky, consumed a lot of power and were unreliable.Silicon and Germanium were used in the making transistors as they can carry current with small amount of impurities.Transistors

Integrated circuitsIntegrated Circuits play a very important part in electronics. Most are specially made for a specific task and contain up to thousands of transistors, diodes and resistors. Special purposes IC's such as audio-amplifiers, FM radios, logic blocks, regulatorsICs can be made very compact, having up to several billion transistors and other electronic components in an area the size of a fingernail. The width of each conducting line in a circuit (the line width) can be made smaller and smaller as the technology advances, in 2008 it dropped below 100 nanometers and in 2013 it is expected to be in the teens of nanometers.Integrated CircuitsEmplyee of Texas Instruments, Kilby recorded his initial ideas concerning the integrated circuit in July 1958, successfully demonstrating the first working integrated example on 12 September 1958. In his patent application of 6 February 1959, Kilby described his new device as a body of semiconductor material ... wherein all the components of the electronic circuit are completely integrated.The first customer for the new invention was the US Air Force.

Kilby won the 2000 Nobel Prize in Physics for his part of the invention of the integrated circuit. Kilby's work was named an IEEE Milestone in 2009.Integrated Circuits

Gordon Moore, 1929 - Cofounded Intel in 1968 with Robert Noyce. Moores Law: the number of transistors on a computer chip doubles every year (observed in 1965) Since 1975, transistor counts have doubled every two years.

Moores lawIEEE patent :- Cramming more components onto Integrated CircuitsIf the automobile had followed the same development cycle as the computer, a Rolls-Royce would today cost $100, get a million miles per gallon, and explode once a year, killing everyone inside. Robert X. Cringely

1975 :- Dynamic RAM developed by intelContained 64000 transistors on a single chip

Moores law

Moores Law

MicroprocessorFirst microprocessor developed was 4004 by the Company named Intel and was designed mainly for the usage in CalculatorIt is reckoned as a CPU-on-a-chipThe microprocessor taught in this course would be 8086 and 8088 microprocessor.

MicrocontrollerThe first micro-controller developed was 8048 by again our faverouite IntelIt is reckoned as Computer-on-a-chipThe microcontroller we will be studying in this course would be 8051

Microcontroller

Introduction to MicroprocessorsWhat is a microprocessor?

Yes, but so much more than these Traditional Computers PCs, MACs, Linux, workstation, desktop, laptop, tablet etc. Almost every electronic device employs one or more microprocessors to implement required functionality

What is a microprocessor?A microprocessor is the central processing unit (CPU) of a stored program digital computer implemented as a single chip integrated circuit.

OK so what is a stored program digital computer ? Lets start with what is a computer? A computer is machine that can be programmed to perform a set of logical & mathematical operations on data

CPU-on-a-ChipConcept evolved into well known digital computer architecture:

Microprocessor tree

General-Purpose ProcessorsGeneral Purpose Processors started from the microprocessors 4004 as discussed earlierWent through 8008 8080 8085 8086 8088 80388 Pentium RISC - CISC 8086 is a 16-bit microprocessor Latest processor being 64-bitRISC : Reduced instruction Set Architecture Examples : Alpha, ARC, MIPS etcCISC Complex Instruction set Architectue Examples : Motorola 68000 family, Intel x86 CPUs

Special Purpose ProcessorEmbedded System is a special purpose computer system (HW and SW) designed to perform some specific function Unlike general purpose computer, performs few predefined tasks with well defined requirements and limitations Usually includes task specific hardware (peripherals) Software usually stored in non-volatile media and known as firmwareSome common examples are DSP boards (2920), TMS-320, Comm Processors, uP 7720

Elements of Microcomputer System Program is stored in memory as a sequence of machine code instructions each machine code instruction occupies one or more memory locations each machine code instruction consists of a pattern of 1s and 0s which determine operation to be performed by the CPU mapping of machine code instructions to CPU operations is sometimes called instruction set architecture

Elements of Microcomputer System

CPU Control Unit Contains special register known as program counter contains memory address of next instruction to be executed Control unit fetches from memory the machine code instruction whose address is given by the program counter Control unit decodes the instruction Control unit executes the instruction including: fetching required data operands from registers and/or memory controlling ALU to perform any required data operation storing any results in registers and/or memory updating program counter to point to address of next instruction to be executed

Control UnitProgram instructions are normally stored in sequential locations in memory Control unit recognizes (conditional) branch instructions which alter the normal program flow

CPU Datapath - Registers Temporary storage location inside CPU Hold data or address of data to be processed Provide operands to ALU and store results from ALU registers can range from: 1 (simple microcontroller with accumulator) to over 100 (128 in Intel Itanium) Status (condition code) register holds bits (flags) that reflect result of last ALU operation (e.g. carry, zero, sign) Faster access than memory (fewer clock cycles)

Arithmetic & Logic Unit (ALU) Performs simple arithmetic and logic operations on data stored in registers and/or memory Add, subtract, and, or, shift, increment, multiply, etc.Operation depends on current machine code instructionSimple operations (register to register add) may execute in one clock cycleMay include special purpose complex operations e.g. square-root, floating point, divide, complex number arithmetictypically take multiple clock cyclesResults stored in registers and/or memoryStatus register updated according to resultBasic Instruction Cycle

Basic Instruction Cycle Fetch: Read machine code instruction from memory at address supplied by program counter (PC) May take multiple memory cycles if instruction occupies more than one memory location Decode : Determine operations to be performed and generate microcode bits to control CPU hardware Execute: Fetch required operands from memory and/or registers Perform required ALU operations Store results in registers and/or memory Update PC