Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Microprocessor

36 views

Published on

Unit 1

Published in: Engineering
  • Be the first to comment

Microprocessor

  1. 1. REE – 602 MICROPROCESSOR
  2. 2. Unit – I: Introduction to Microprocessor Introduction to Microprocessor and its application Microprocessor Evaluation Tree Microprocessor Architecture (Harvard & Princeton) General Architecture of the Microprocessor and its operation Component of Microprocessor System: Processor, Buses, Memory, Input-Outputs(I/O’s) and other interfacing devices
  3. 3. What is Microprocessor Microprocessor is a computer Central Processing Unit (CPU) onasinglechip. Itcontainsmillionsof transistors connectedbywires.
  4. 4. BUSES The data bus is a bidirectional group of lines on which the data can travel both ways, i.e., from a microprocessor to a device and vice versa. The address bus is a unidirectional group of lines on which address of a memory location or a device is sent by the microprocessor.  The control bus is a group of lines on which control signals flow from the microprocessor to the connected devices and vice versa. Examples of control signals are ‘memRead’, ‘memWrite’, ‘ioRead’, ‘ioWrite’, ‘reset’, etc.Computer Fundamentals and Programming in C 6
  5. 5. Application’s of Microprocessor  A microprocessor makes daily life easier because of its low cost, low power, small weight, and vast application in every field. There are several applications of microprocessors. Some of the important applications are:  (1) Household Devices:- The programmable thermostat allows the control of temperature at homes. In this system, a microprocessor works with the temperature sensor to determine and adjust the temperature accordingly.  High-end coffee makers, Washing machines, and radio clocks contain microprocessor technology.  Some other home items that contain microprocessors are: microwaves, toasters, televisions, VCRs, DVD players, ovens, stoves, clothes washers, stereo systems, home computers, alarm clocks, hand-held game devices, thermostats, video game systems, bread machines, dishwashers, home lighting systems and even some refrigerators with digital temperature control.
  6. 6.  (2) Industrial Applications of Microprocessors Some industrial items which use microprocessors technology include: cars, boats, planes, trucks, heavy machinery, elevators, gasoline pumps, credit-card processing units, traffic control devices, computer servers, most high tech medical devices, surveillance systems, security systems, and even some doors with automatic entry. (3) Transportation Industry  Automobiles, trains and planes also use microprocessor technology.  Consumer vehicles-buses, cars, trucks -integrate microprocessors to communicate important information throughout the vehicle. E.g., navigation systems provide information using microprocessors and global positioning Application’s of Microprocessor
  7. 7.  (4) Computers and Electronics  Microprocessor-drives technology is the brain of the computer. They are used in all type of computers ranging from microcomputers to supercomputers.  A cell phone or mobile device executes game instructions by way of the microprocessor.  VCRs, televisions and gaming platforms also contain microprocessors for executing complex instructions and tasks. Application’s of Microprocessor
  8. 8.  (5) In Medicals  Many medical devices, like an insulin pump, are typically controlled by a microprocessor. The microprocessors perform various functions, such as processing data from bio-sensors, storing measurements, and analyzing results.  (6) Instrumentation  Microprocessor is also very useful in the field of instrumentation. Function generators, frequency counters, frequency synthesizers, spectrum analyses and many other instruments are available, when microprocessors are used as controller.  (7) Entertainment  The use of microprocessor in entertainment equipment, toys and home entertaining applications is making them more useful and full of features. Application’s of Microprocessor
  9. 9.  (8) Embedded Systems at Home  A number of modern devices in the home are microprocessor based i.e. camera; washing machines; calculators; hi-fi systems; telephones; microwave ovens; burglar alarms etc. The input are usually simple numeric keyboards, sensors, buttons or while the output include lights, simple LCD screens displays, motors and relays, LEDs, buzzers etc.  (9) Office Automation and Publication  Microprocessor based system with software packages has changed the office environment. Microprocessors based systems are being used for spread sheet operations, word processing, storage etc.  The Publication technology has revolutionized by the Application’s of Microprocessor
  10. 10.  (9) Communication  In communication the telephone industry is most important. In this industry, microprocessors are used in digital telephone sets, telephone exchanges and modem etc.  The use of microprocessor in satellite communication, television, has made teleconferencing possible.  Railway reservation and airline reservation system also uses microprocessor technology. WAN (Wide Area Network) and LAN (Local Area Network) for communication of vertical information through computer network. Application’s of Microprocessor
  11. 11. Generations of Microprocessors 13
  12. 12. Microprocessor Architecture (Harvard and Princeton / Von - Neumann)
  13. 13. Von Neumann Architecture / Princeton Architecture A design architecture for an electronic digital computer: a processing unit : arithmetic logic unit and processor registers a control unit : an instruction register and program counter, a memory: to store both data and instructions This architecture has evolved to be any stored-program computer in which an instruction fetch and a data operation cannot occur at the same time because they share a common bus. This is referred to as the Von Neumann bottleneck and often limits the performance of the system
  14. 14. Harvard Architecture A computer Architecture with physically separate storage and signal pathways for instructions and data. (This term stores instructions on punched tape and data in electro-mechanical counters) Today, most processors implement such separate signal pathways for performance reasons but actually implement a modified Harvard architecture, so they can support tasks such as loading a program from disk storage as data and then executing it.
  15. 15. Compare between Von Neumann architectures and Harvard architectures: Von Neumann architecture: the CPU can be either reading an instruction or reading/writing data from/to the memory. Both cannot occur at the same time since the instructions and data use the same bus system. Harvard architecture: the CPU can both read an instruction and perform a data memory access at the same time, even without a cache. Also, a Harvard architecture machine has distinct code and data address spaces.(instruction address zero is not the same as data address zero.) A Harvard architecture computer can thus be faster for a given circuit complexity because instruction fetches and data access do not contend for a single memory pathway.
  16. 16. Microprocessor 8085 :-  8085 is pronounced as "eighty-eighty-five" microprocessor. It is an 8-bit microprocessor designed by Intel in 1977 using NMOS technology.  It has the following configuration −  8-bit data bus  16-bit address bus, which can address up to 64KB  A 16-bit program counter  A 16-bit stack pointer  Six 8-bit registers arranged in pairs: BC, DE, HL  Requires +5V supply to operate at 3.2 MHZ single phase clock  It is used in washing machines, microwave ovens, mobile phones, etc.
  17. 17. 19 Memory Memory is a collection of cells, each with a unique physical address The size of a cell is normally a power of 2, typically a byte today.
  18. 18. 20 Memory A cell is the smallest addressable unit of memory – i.e. one cell can be read from memory or one cell can be written into memory, but nothing smaller.
  19. 19. 21 RAM and ROM  RAM stands for Random Access Memory Inherent in the idea of being able to access each location is the ability to change the contents of each location  ROM stands for Read Only Memory The contents in locations in ROM cannot be changed  RAM is volatile, ROM is not This means that RAM does not retain its bit configuration when the power is turned off, But ROM does
  20. 20. 22 MEMORY UNIT (or RAM- Random Access Memory) Each cell has an address, starting at 0 and increasing by 1 for each cell. A cell with a low address is just as accessible as one with a high address- hence the name RAM. The width of the cell determines how many bits can be read or written in one machine operation. MAR is Memory Address Register MDR is Memory Data Register
  21. 21. 23 What is a Register? Data can be moved into and out of registers faster than from memory. If we could replace all of memory with registers, we could produce a very, very fast computer ... But, the price would be terribly prohibitive.  Most computers have quite a few registers that serve different purposes. We’ll see how the MAR and the MDR are used.
  22. 22. 24 How does the memory unit work? Trace the following operation: Store data D in memory location 0. DD00 D0 D s D
  23. 23. 25 How does the memory unit work? Trace the following operation: 1) Fetch data D from memory location 1. 2) Obtain an instruction I from memory location 7. How does the computer distinguish between 1) and 2) above? We need to look at the control unit later. 1 D f D I
  24. 24. 26 USING THE DECODER CIRCUIT TO SELECT MEMORY LOCATIONS 0 1 2 3 4 5 6 7 • • • 15 4 x 24 decoder 1 0 1 1 1 MAR 0 0 0 0
  25. 25. 27 The decoder circuit doesn't scale well--- i.e. as the number of bits in the MAR increases, the number of output lines for the decoder goes up exponentially. Most computers today have an MAR of 32 bits. Thus, if the memory was laid out as we showed it, we would need a 32 x 232 decoder! Note 232 is 22 230 = 4 G So most memory is not 1 dimensional, but 2- dimensional (or even 3-dimensional if banked memory is used).
  26. 26. 28 2-D MEMORY 0 1 1 1 MAR 2 x 4 decoder 2 x 4 decoder columns rows Note that a 4 x 16 decoder was used for the 1-D memory.
  27. 27. 29 Arithmetic/Logic Unit (ALU) Performs basic arithmetic operations such as adding Performs logical operations such as AND, OR, and NOT Most modern ALUs have a small amount of registers where the work takes place. For example, adding A and B, we might find A stored in one register, B in another, and their sum stored in, say, A, after the adder computes the sum.
  28. 28. 30 The ALU Uses a Multiplexer R AL1 AL2 ALU circuits multiplexer selector lines output GT EQ LT condition code register Register R Other registers
  29. 29. 31 ADD X X D D ADD X f ALU1 & ALU2 E E+DE D E+D E+D
  30. 30. 32 Control Unit A Control Unit is the unit that handles the central work of the computer. There are two registers in the control unit The instruction register (IR) contains the instruction that is being executed The program counter (PC) contains the address of the next instruction to be executed The ALU and the control unit together are called the Central Processing Unit, or CPU
  31. 31. 33 ALL A COMPUTER DOES IS ... Repeat forever (or until you pull the plug or the system crashes) 1) FETCH (the instruction) 2) DECODE (the instruction) 3) EXECUTE (the instruction)
  32. 32. 34 The Fetch-Execute Cycle Fetch the next instruction Decode the instruction Execution Cycle Gets data if needed Execute the instruction Normally “Get data if needed” is considered part of the “Execute the instruction”.
  33. 33. 35 The Fetch-Execute Cycle (3) (a) (b)
  34. 34. 36 How Does the Control Unit Work? The PC holds the address of the next instruction to be executed. Whatever is stored at that address is assumed to be an instruction. Once the instruction is fetched, the PC is incremented .
  35. 35. 37 Input / Output Units An input unit is a device through which data and programs from the outside world are entered into the computer Keyboard, the mouse, and scanning devices An output unit is a device through which results stored in the computer memory are made available to the outside world Printers and video display terminals
  36. 36. 38 THE I/O DEVICES Pictorially, these look the simplest, but in reality, they form the most diverse part of a computer. Includes: keyboards, monitors, joysticks, mice, tablets, lightpens, spaceballs, ....
  37. 37. 39 I/O UNITS Processor Memory I/O buffer Control-logic I/0 device Each device is different, but most are interrupt driven. This means when the I/O device wants attention, it sends a signal (the interrupt) to the CPU.
  38. 38. Microprocessors I - Frederick University 40 Basic Concepts  A memory device can be le. viewed as a single column tab  Table index (row number) refers to the address of the memory.  Table entries refer to the memory contents or data.  Each table entry is referred as a memory location or as a word.  Both the memory address and the memory contents are binary numbers, expressed in most cases in Hex format.  The size of a memory device is specified as the number of memory locations X width or word size (in bits).  For example a 1K X 8 memory device has 1024 memory locations, with a width of 8 bits. 000 001 002 003 Hex Memory Contents 3FC 3FD 3FE 10011001 00111000 00-0000-0000 00-0000-0001 00-0000-0010 00-0000-0011 11-1111-1100 11-1111-1101 11-1111-1110 11-1111-1111 3FF 11001001 00111011 01101000 10111001 00110100 00011000 Memory Address Binary 1024 X 8 (or 1KX8) Memory
  39. 39. 41 Address Lines A memory device or memory chip must have three types of lines or connections: Address, Data, and Control. Address Lines: The input lines that select a memory location within the memory device. Decoders are used, inside the memory chip, to select a specific location The number of address pins on a memory chip specifies the number of memory locations. If a memory chip has 13 address pins (A0..A12), then it has: 213 = 23 X 210 = 8K locations. If a memory chip has 4K locations, then it should have N pins: 2N = 4K = 22 X 210 = 212  N=12 address pins (A0..A11) Location 000 Location 001 Location 002 Location 003 Location 0FC Location 0FD Location 0FE Location 0FF Y00 Y01 Y02 Y03 YFC YFD YFE YFF A00 A01 An-2 An-1
  40. 40. 42 Data Lines Data Connections: All memory devices have a set of data output pins (for ROM devices), or input/output pins (for RAM devices). Most RAM chips have common bi-directional I/O connections. Most memory devices have 1, 8 or 16 data lines. k- address lines (A0..Am-1) n-bits per word Data Input Lines (DI0..DIn-1) Read (RD) Write (WR) 2m words Data Output Lines (DO0..DOn-1) (2m X n) RAM with separate I/P and O/P Data lines Chip Select (CS) k- address lines (A0..Am-1) n-bits per word Read/Write (R/W) Chip Select (CS) 2m words Data Input/Output Lines (D0..Dn-1) (2m X n) RAM with common I/P and O/P Data lines k- address lines (A0..Am-1) n-bits per word Output Enable (OE) Chip Select (CS) 2m words Data Output Lines (D0..Dn-1) (2m X n) ROM with only O/P Data lines
  41. 41. 43 Control Lines Enable Connections: All memory devices have at least one Chip Select (CS) or Chip Enable (CE) input, used to select or enable the memory device. If a device is not selected or enabled then no data can be read from, or written into it. The CS or CE input is usually controlled by the microprocessor through the higher address lines via an address decoding circuit. Control Connections: RAM chips have two control input signals that specify the type of memory operation: the Read (RD) and the Write (WR) signals. Some RAM chips have a common Read/ Write (R/W) signal. ROM chips can perform only memory read operations, thus there is no need for a Write (WR) signal. In most real ROM devices the Read signal is called the Output Enable (OE) signal.
  42. 42. 44 Memory Read Operations A memory read operation is carried out in the following steps: The processor loads on the Address bus the address of the memory location to be read (Step 1). Some of the address lines select the memory devices that owns the memory location to be read (Step 1a), while the rest point to the required memory location within the memory device. The processor activates the Read (RD) signal (Step 2). The selected memory device loads on the data bus the content of the memory location specified by the address bus (Step 3). The processor reads the data from the data bus, and resets the RD signal (Step 4). Address Bus Clock Chip Enable Read (RD) Data Bus T1 T2 T3 Valid Address Valid DataInvalid Data Step 1 Step 1a Step 2 Step 3 Step 4
  43. 43. 45 Memory Write Operations A memory write operation is carried out in the following steps: The processor loads on the Address bus the address of the memory location (Step 1). Some of the address lines select the memory devices that owns the memory location to be written (Step 1a), while the rest point to the required memory location within the memory device. The processor loads on the data bus the data to be written (Step 2). The processor activates the Write (WR) signal (Step 3). The data at the data bus is stored in the memory location specified by the address bus (Step 4). Address Bus Clock Chip Enable Write (WR) Data Bus T1 T2 T3 Valid Address Valid Data Step 1 Step 1a Step 2 Step 4 Step 3
  44. 44. 46 Types of Semiconductor Memory Devices Read Only Memory (ROM)  A memory device that maintains its data permanently (or until the device is reprogrammed).  Non-volatile: It maintains its data even without power supply.  Used to store  Programs such as the BIOS.  Data such as look tables  e.g. the bit pattern of the characters in a dot matrix printer.  A ROM device can be 1. Masked ROM (Programmed by the manufacturer) 2. Programmable ROM (can be program- erased-reprogrammed many times Random Access Memory (RAM) • A memory device that can be read and written. – Volatile: It looses its data when the power supply is switched-off – When the supply is switched-on it contains random data • Used to store – User programs that are loaded from a secondary memory (disk) – Temporary data used by programs such as variables and arrays. • A RAM device can be 1. Static 2. dynamic
  45. 45. 47 A Read Only Memory Example Implementation of an 8X4 ROM using (a) a decoder and OR-gates and (b) a decoder and diodes. Address Data 000 0011 001 0010 010 0100 011 0011 100 1010 101 0000 110 0101 111 1000 Y2 A0 Y0 Y1 Y3 3/8 DEC. Y6 Y4 Y5 Y7 A1 A2 E A2 A1 A0 CS OE D2 D1 D0D3 Y2 A0 Y0 Y1 Y3 3/8 DEC. Y6 Y4 Y5 Y7 A1 A2 E A2 A1 A0 CS OE D2 D1 D0D3 +5V
  46. 46. 48 A Programmable Read Only Memory Example Implementation of an 8X4 ROM using a decoder and fused links. Y2 A0 Y0 Y1 Y3 3/8 DEC. Y6 Y4 Y5 Y7 A1 A2 E A2 A1 A0 CS OE D2 D1 D0D3 +5V

×