Microprocessor or Microcontroller

Slides:



Advertisements
Similar presentations
Microprocessors A Beginning.
Advertisements

Microprocessor or Microcontroller Not just a case of “you say tomarto and I say tomayto” M. Smith, ECE University of Calgary, Canada.
EEE226 MICROPROCESSORBY DR. ZAINI ABDUL HALIM School of Electrical & Electronic Engineering USM.
 2002 Prentice Hall Hardware Basics: Inside The Box Chapter 2.
Processor System Architecture
MICRO PROCESSER The micro processer is a multipurpose programmable, clock driven, register based, electronic integrated device that has computing and decision.
Khaled A. Al-Utaibi  Computers are Every Where  What is Computer Engineering?  Design Levels  Computer Engineering Fields  What.
Microprocessor or Microcontroller Not just a case of “you say tomarto and I say tomayto” M. Smith, ECE University of Calgary, Canada.
Hardware Basics: Inside the Box 2  2001 Prentice Hall2.2 Chapter Outline “There is no invention – only discovery.” Thomas J. Watson, Sr. What Computers.
Microprocessor or Microcontroller Not just a case of “you say tomarto and I say tomayto” M. Smith, ECE University of Calgary, Canada.
Getting the O in I/O to work on a typical microcontroller Ideas of how to send output signals to the radio controlled car. The theory behind the LED controller.
Getting the O in I/O to work on a typical microcontroller Activating a FLASH memory “output line” Part 1 Main part of Laboratory 1 Also needed for “voice.
Chapter 17 Microprocessor Fundamentals William Kleitz Digital Electronics with VHDL, Quartus® II Version Copyright ©2006 by Pearson Education, Inc. Upper.
Microprocessor or Microcontroller Not just a case of “you say tomarto and I say tomayto” M. Smith, ECE University of Calgary, Canada.
1 © Unitec New Zealand Embedded Hardware ETEC 6416 Date: - 10 Aug,2011.
Revised: Aug 1, ECE 263 Embedded System Design Lesson 1 68HC12 Overview.
Basic Architecture Lecture 15. In general, if the number of bits is n, then the number of different combinations of 0s and 1s that can be made is 2 n.
Computer Organization - 1. INPUT PROCESS OUTPUT List different input devices Compare the use of voice recognition as opposed to the entry of data via.
General Concepts of Computer Organization Overview of Microcomputer.
Introduction to Microprocessors
Computer Hardware A computer is made of internal components Central Processor Unit Internal External and external components.
Computer and Information Sciences College / Computer Science Department CS 206 D Computer Organization and Assembly Language.
What is a Microprocessor ? A microprocessor consists of an ALU to perform arithmetic and logic manipulations, registers, and a control unit Its has some.
Computer operation is of how the different parts of a computer system work together to perform a task.
Simple ALU How to perform this C language integer operation in the computer C=A+B; ? The arithmetic/logic unit (ALU) of a processor performs integer arithmetic.
بسم الله الرحمن الرحيم MEMORY AND I/O.
1 Basic Processor Architecture. 2 Building Blocks of Processor Systems CPU.
Computer Architecture and Number Systems
CPU Lesson 2.
GCSE Computing - The CPU
Computer Organization and Architecture Lecture 1 : Introduction
Unit Microprocessor.
Systems Architecture Keywords Fetch Execute Cycle
Basic Computer Organization and Design
COURSE OUTCOMES OF Microprocessor and programming
Microprocessor and Microcontroller Fundamentals
Everybody.
Starter: Stored Program Concept (von Neumann Architecture)
Microcontrollers & GPIO
Computer Hardware – System Unit
What is a computer? Simply put, a computer is a sophisticated electronic calculating machine that: Accepts input information, Processes the information.
UNIT 9 Computer architecture
Computing Systems Organization
What is a computer? Simply put, a computer is a sophisticated electronic calculating machine that: Accepts input information, Processes the information.
UNIT – Microcontroller.
Microcontroller Based Digital Code Lock
Introduction to microprocessor (Continued) Unit 1 Lecture 2
Assembly Language for Intel-Based Computers, 5th Edition
Introduction of microprocessor
Microprocessor and Assembly Language
Dr. Michael Nasief Lecture 2
Chapter 3 Top Level View of Computer Function and Interconnection
Microcomputer Architecture
General Architecture of Digital Computer
Instructions at the Lowest Level
An Introduction to Microprocessor Architecture using intel 8085 as a classic processor
Introduction to Microprocessors and Microcontrollers
Number Representations and Basic Processor Architecture
Morgan Kaufmann Publishers Computer Organization and Assembly Language
Chapter 5: Computer Systems Organization
Md. Mojahidul Islam Lecturer Dept. of Computer Science & Engineering
Md. Mojahidul Islam Lecturer Dept. of Computer Science & Engineering
Computer Architecture
Introduction to Computer Architecture
Chapter 5 Computer Organization
Wireless Embedded Systems
Computer Architecture
GCSE Computing - The CPU
Register sets The register section/array consists completely of circuitry used to temporarily store data or program codes until they are sent to the.
COMPUTER ARCHITECTURE
Presentation transcript:

Microprocessor or Microcontroller

Von Neumann Architecture Memory Input and Output (I/O) Central Processing Unit (CPU) arithmetic and logic unit (ALU) control unit Although there are many different kinds of microprocessors and microprocessor-based systems, most microprocessors are designed using the same architecture. The most popular computer architecture used nowadays is the von Neumann architecture. More complex systems use the Harvard architecture (to be explained in Lecture 11). The von Neumann architecture divides the computer system into five parts: computation unit, control unit, memory, input, and output. Generally, the computation and control unit together are called the central processing unit (CPU). Input and output are also normally considered together and referred to as I/O. I/O CPU Memory

Buses Communication is needed among components. Wires connecting the components are called buses. There are three types of buses: address, data, and control. CPU Memory I/O We have mentioned that a microcomputer includes three fundamental components, Central Processing Unit (CPU), Main Memory (MM), and Input/Output (I/O). These three components are connected by sets of parallel electric conductors (wires), called buses. A bus is a set of parallel connections between components. There are three types of buses in a microcomputer: address, data, and control. The address bus is used mainly by the microprocessor to indicate which particular address in main memory or which I/O port needs to be accessed. The data bus is used for retrieving information from main memory or I/O for the microprocessor, or for storing the information from the microprocessor to memory or I/O. The control bus is responsible for transmitting task commands such as “read” and “write” to the memory and I/O components and for receiving corresponding responses from them. Address bus Data bus Control bus

Buses: 68HC12 Address Bus Communication is needed among components. Wires connecting the components are called buses. There are three types of buses: address, (16 bits) data, control. CPU Memory I/O . Address bus Data bus Control bus

Buses: 68HC12 Data Bus Communication is needed among components. Wires connecting the components are called buses. There are three types of buses: address, data, (8 or 16 bits) control. CPU Memory I/O .. Address bus Data bus Control bus

Buses: 68HC12 Control Bus Communication is needed among components. Wires connecting the components are called buses. There are three types of buses: address, data, control. CPU Memory I/O . Address bus Data bus Control bus

Computer Operation The computer executes instructions consisting of opcodes and operands, which are stored sequentially in memory as binary numbers. The program counter points to the next instruction to be executed. Operands may be data or addresses or address increments. A stored program computer merely does what it is told. The computer fetches an instruction, performs the tasks dictated by that instruction and then fetches the next instruction. The instructions are stored sequentially in memory and executed in a sequential manner unless program logic dictates a branch. Nearly all computers use zero/one logic in the hardware and therefore store their instructions and data as binary numbers. Although values may be represented as hex or decimal numbers in a program, they are stored in memory in binary representation.

Computer Operation: 68HC12 The computer executes instructions consisting of opcodes and operands, which are stored sequentially in memory as binary numbers. The 68HC12 instruction set contains 209 instructions. The program counter (PC register) points to the next instruction to be executed. The 68HC12 address bus is 16 bits wide so its PC register is a 16-bit register. Operands may contain data or addresses. The number of bytes of operands depends on the instruction. A stored program computer merely does what it is told. The computer fetches an instruction, performs the tasks dictated by that instruction and then fetches the next instruction. The instructions are stored sequentially in memory and executed in a sequential manner unless program logic dictates a branch. Nearly all computers use zero/one logic in the hardware and therefore store their instructions and data as binary numbers. Although values may be represented as hex or decimal numbers in a program, they are stored in memory in binary representation.

Microprocessor – Basic concept ADDRESS BUS 32-bit / 64-bit wide CONTROL BUS Timing signals, ready signals, interrupts etc DATA BUS – bidirectional 8-bit / 16-bit / 32-bit / 128-bit CPU contains CCU ALU data registers and pointer registers Microprocessor, by-itself, completely useless – must have external peripherals to Interact with outside world 13 September 2006 Differences between a microprocessor and a microcontroller M. Smith, University of Calgary, Canada

MicroPROCESSOR – Basic concept CONTROL BUS ADDRESS BUS DATA BUS CPU contains CCU ALU data registers and pointer registers BOOT ROM Used at startup Instruction (program) ROM Transducers Keyboard Screen UART Parallel interface etc Data RAM Microprocessor, by-itself, completely useless – must have external peripherals to Interact with outside world 13 September 2006 Differences between a microprocessor and a microcontroller M. Smith, University of Calgary, Canada

Every external device needs this amount of support “glue logic” to work ADDRESS BUS DECODE LOGIC Address strobe Data strobe Read/Write control CS – chip select Device itself with all necessary internal logic to do the things it needs to do External Device OE Output Enable other signals such as interrupt signals, etc DATA BUS 13 September 2006 Differences between a microprocessor and a microcontroller M. Smith, University of Calgary, Canada

Issues with external devices Many pins Mechanical failure rates increased Design time increased – routing issues Cost increased, board size increased Continually redesigning same thing Compatibility between parts Upgrade part Many similar options between different projects In Real-life -- Don’t need “100% flexibility” 13 September 2006 Differences between a microprocessor and a microcontroller M. Smith, University of Calgary, Canada

MicroCONTROLLER – Basic concept ADDRESS DATA CPU contains CCU ALU data registers and pointer registers BOOT ROM Used at startup Instruction (program) ROM Transducers UART Parallel interface Etc Data RAM Microcontroller – put a limited amount of most commonly used resources “inside” the chip – a “limited” amount is often “enough” for many applications 13 September 2006 Differences between a microprocessor and a microcontroller M. Smith, University of Calgary, Canada

Advantages of microCONTROLLER over microPROCESSOR Pin count down Design time down, Board layout size down Upgrade path easier – matching between peripherals for speed Cost down – bulk purchases Reliability up Common software / hardware design environment available from manufacturer 13 September 2006 Differences between a microprocessor and a microcontroller M. Smith, University of Calgary, Canada

Issues when using microcontroller Two types of memory – speed issues when using On-chip – fast, easy to access, “almost as fast as using a register”, limited amount of on-chip memory available Off-chip – slower to access – additional cost Use on-chip memory in a “cache” mode (copy off-chip data to on-chip when processing data, then copy back) External components still there E.g. Video CODECs – need to use DMA – Direct Memory Access – so that the controller can get on with the “processing” and let something else worry about moving data in and out of the chip Real time environment Event driven – can’t WAIT for a device to become ready, can’t POLL to see if device is ready, interrupt handling is key All these resources are “power hungry” and compete for resources (data busses etc) – special features to control power use 13 September 2006 Differences between a microprocessor and a microcontroller M. Smith, University of Calgary, Canada

Components of the Blackfin Board From smallest to largest Processor Core One core on Blackfin ADSP-BF533 processor Two cores on Blackfin ADSP-BF561 processor Processor itself core + some memory + some other built incapability Blackfin Evaluation board Don’t forget the software development package VisualDSP++ 13 September 2006 Differences between a microprocessor and a microcontroller M. Smith, University of Calgary, Canada

Blackfin ADSP-BF533 CORE THIS IS ANIMATED 13 September 2006 Differences between a microprocessor and a microcontroller M. Smith, University of Calgary, Canada

Some key discussed elements from the previous slide Why did the processor designers allow 2 loads from memory at the same time, a load and store at the same time, but not two stores at the same time? Why would the processor designers place 8-bit ALUs operations available on a processor that has 32-bit registers? Give an example of an instruction where four 8-bit ALU operations occur at the same time Give an example of an instruction where two 16-bit ALU operations occur at the same time 13 September 2006 Differences between a microprocessor and a microcontroller M. Smith, University of Calgary, Canada

CORE 13 September 2006 Differences between a microprocessor and a microcontroller M. Smith, University of Calgary, Canada The “chip” itself

Exercise 1.1 What are the three basic components of a microcomputer? What are the three buses in a microcomputer? What is the functionality of each bus? The address bus of the 68HC12 has 16 bits. How many different memory addresses can the 68HC12 access? How many address lines are necessary to address one kilobyte of memory? How many address lines are necessary to address one megabyte memory?

Enter the key elements from previous slide Will you learn to “flash” memory in this class, and how would you do it and why? What does a watch-dog timer do – and “how do you find out how to feed it?” What does the acronym MMU stand for? What does the acronym SPI stand for, and in what labs will we be using the SPI? When is the PPI used? What’s a real time clock? 13 September 2006 Differences between a microprocessor and a microcontroller M. Smith, University of Calgary, Canada

13 September 2006 Differences between a microprocessor and a microcontroller M. Smith, University of Calgary, Canada EVALUATION BOARD

Lab. 1 – demonstration of microcontroller capability Use the microcontroller Configure the FLASH memory Contains memory and also I/O components (input / output) Use the FLASH memory I/O capability to control the LED Configure the PF I/O lines (Programmable flags) Used to control many of the external devices (chip select and timing lines) Used as input (Lab. 2) and / or interrupt lines (Lab. 3) 13 September 2006 Differences between a microprocessor and a microcontroller M. Smith, University of Calgary, Canada

Push-button switches (PF lines) LED (controlled by FLASH memory logic) 13 September 2006 Differences between a microprocessor and a microcontroller M. Smith, University of Calgary, Canada

Need to learn how to “configure” the flash memory so that We can control the LEDs If we can control the LED’s then we have signals that could be used for a “radio-controlled” car Parallel interfaces present on the FLASH memory chips 13 September 2006 Differences between a microprocessor and a microcontroller M. Smith, University of Calgary, Canada

Configure the PF lines (Programmable Flags – Input and output pins) Animated Replace one button input with the input of a temperature transducer and you have designed a “Software controlled thermometer” TMP03 will be used in Laboratory 2 13 September 2006 Differences between a microprocessor and a microcontroller M. Smith, University of Calgary, Canada

Control of the PF lines – how / why? FIO_FLAG_D – Data register FIO_EDGE -- Edge register FIO_DIR -- Direction register FIO_POLAR -- Polarity register 13 September 2006 Differences between a microprocessor and a microcontroller M. Smith, University of Calgary, Canada

PF lines being used already to control other devices – “We are not alone!!” When we change the PF registers bits, we must ONLY change those over which we have control PF8, PF9, PF10, PF11 Must learn the instructions to safely change some register bits and not others (AND and OR instructions) FIO_FLAG_D register has 16 I/O pins (Flag pins) available 13 September 2006 Differences between a microprocessor and a microcontroller M. Smith, University of Calgary, Canada

Enter the key elements from previous slide Which A/D is used on the Blackfin board? Why are the signals that control the LED’s coming from the FLASH? What does SPORT1 means, and what external device is being controlled by it? How does the SPORT device allow “time sharing” of the bus by several different external devices? 13 September 2006 Differences between a microprocessor and a microcontroller M. Smith, University of Calgary, Canada

Audio-Video Interaction of ADSP-BF533 Ez-Kit Lite with the outside world 13 September 2006 Differences between a microprocessor and a microcontroller M. Smith, University of Calgary, Canada

13 September 2006 Differences between a microprocessor and a microcontroller M. Smith, University of Calgary, Canada

Review quiz CPU stands for CCU stands for ALU stands for DMA stands for 13 September 2006 Differences between a microprocessor and a microcontroller M. Smith, University of Calgary, Canada

Review Quiz How come the FLASH memory must be used to control the LEDs and not the GPIO register pins (general purpose I/O)? Why can’t we use PF0 line in Lab. 2 to read temperature transducer input signals? Why will AND and OR operations be necessary when we control the PF I/O lines? What does PF stand for? 13 September 2006 Differences between a microprocessor and a microcontroller M. Smith, University of Calgary, Canada

Tackled today Basic microprocessor Concept of a microcontroller Difference between the Blackfin microcontroller and Blackfin Ez-Kit Lite evaluation board Capabilities of the ADSP-BF533 Blackfin Ez-Kit Lite evaluation board Various acronyms that will be used in the course 13 September 2006 Differences between a microprocessor and a microcontroller M. Smith, University of Calgary, Canada