Chapter 17 Microprocessor Fundamentals William Kleitz Digital Electronics



























- Slides: 27

Chapter 17 Microprocessor Fundamentals William Kleitz Digital Electronics with VHDL, Quartus® II Version Copyright © 2006 by Pearson Education, Inc. Upper Saddle River, New Jersey 07458 All rights reserved.

Introduction to System Components and Buses • Microprocessor – general-purpose device – driven by software – perform a specific task • Support Circuitry – data input switches – output data William Kleitz Digital Electronics with VHDL, Quartus® II Version Copyright © 2006 by Pearson Education, Inc. Upper Saddle River, New Jersey 07458 All rights reserved.

Introduction to System Components and Buses • Microprocessor – Intel 8085 – Motorola 6800 – Zilog Z 80 – reads program instructions – executes instructions drives external buses – to make connected devices perform functions William Kleitz Digital Electronics with VHDL, Quartus® II Version Copyright © 2006 by Pearson Education, Inc. Upper Saddle River, New Jersey 07458 All rights reserved.

Introduction to System Components and Buses • Microprocessor – buses • • groups of conductors routed throughout the system tapped into by various devices share information William Kleitz Digital Electronics with VHDL, Quartus® II Version Copyright © 2006 by Pearson Education, Inc. Upper Saddle River, New Jersey 07458 All rights reserved.

Introduction to System Components and Buses • Address Bus – 16 bits wide – generated by microprocessor – to select a particular location or IC to be active • Data Bus – sends or receives 8 bits of data to or from the address – bidirectional William Kleitz Digital Electronics with VHDL, Quartus® II Version Copyright © 2006 by Pearson Education, Inc. Upper Saddle River, New Jersey 07458 All rights reserved.

Introduction to System Components and Buses • Control Bus – varying width depending on processor used – carries control signals – identifies operation • Address Decoder – like 74 LS 138 – ensures that only one IC is active – to avoid bus conflict William Kleitz Digital Electronics with VHDL, Quartus® II Version Copyright © 2006 by Pearson Education, Inc. Upper Saddle River, New Jersey 07458 All rights reserved.

Introduction to System Components and Buses • Memory – ROM or EPROM • initialization instructions • monitor program • operating system – RAM • volatile • used only for temporary storage William Kleitz Digital Electronics with VHDL, Quartus® II Version Copyright © 2006 by Pearson Education, Inc. Upper Saddle River, New Jersey 07458 All rights reserved.

Introduction to System Components and Buses • Input Port – provide data to microprocessor via the data bus – octal buffer with tri-state outputs • Output Port – talk to the outside world – sends data to output device – octal D flip-flop William Kleitz Digital Electronics with VHDL, Quartus® II Version Copyright © 2006 by Pearson Education, Inc. Upper Saddle River, New Jersey 07458 All rights reserved.

Software Control of Microprocessor Systems • Operational changes made with software • Accumulator – stores information for the microprocessor • Assembly Language – software that drives the microprocessor – mnemonics • abbreviation of the operation to be performed William Kleitz Digital Electronics with VHDL, Quartus® II Version Copyright © 2006 by Pearson Education, Inc. Upper Saddle River, New Jersey 07458 All rights reserved.

Internal Architecture of a Microprocessor • 8085 A software compatible with 8080 A • See Figure 17 -2 – internal architecture – functional block diagram • See Figure 17 -3 – pin configuration • Central Processing Unit (CPU) William Kleitz Digital Electronics with VHDL, Quartus® II Version Copyright © 2006 by Pearson Education, Inc. Upper Saddle River, New Jersey 07458 All rights reserved.

Figure 17 -3 Figure 17 -2 William Kleitz Digital Electronics with VHDL, Quartus® II Version Copyright © 2006 by Pearson Education, Inc. Upper Saddle River, New Jersey 07458 All rights reserved.

Internal Architecture of a Microprocessor • Internal Data Bus • General-Purpose Registers – B, C, D, E, H, L • Arithmetic Logic Unit (ALU) – arithmetic operations – five flag flip-flops • Instruction Register and Decoder – receive instructions interpret and create signals William Kleitz Digital Electronics with VHDL, Quartus® II Version Copyright © 2006 by Pearson Education, Inc. Upper Saddle River, New Jersey 07458 All rights reserved.

Internal Architecture of a Microprocessor • Interrupt Control – external digital signal that interrupts the software during execution • Stack Pointer – stores address of the last entry on the stack – stack - data storage area in RAM • Program Counter – 16 -bit address of next software instruction William Kleitz Digital Electronics with VHDL, Quartus® II Version Copyright © 2006 by Pearson Education, Inc. Upper Saddle River, New Jersey 07458 All rights reserved.

Instruction Execution Within a Microprocessor • • See Figure 17 -4 Load Accumulator Store Accumulator See Table 17 -2 – assembly language and machine code listing William Kleitz Digital Electronics with VHDL, Quartus® II Version Copyright © 2006 by Pearson Education, Inc. Upper Saddle River, New Jersey 07458 All rights reserved.

Figure 17 -4 William Kleitz Digital Electronics with VHDL, Quartus® II Version Copyright © 2006 by Pearson Education, Inc. Upper Saddle River, New Jersey 07458 All rights reserved.

William Kleitz Digital Electronics with VHDL, Quartus® II Version Copyright © 2006 by Pearson Education, Inc. Upper Saddle River, New Jersey 07458 All rights reserved.

Hardware Requirements for Basic I/O Programming • Memory-Mapped I/O – input and output devices accessed as if they were memory locations • I/O-Mapped I/O – identify input and output devices by an 8 -bit port number William Kleitz Digital Electronics with VHDL, Quartus® II Version Copyright © 2006 by Pearson Education, Inc. Upper Saddle River, New Jersey 07458 All rights reserved.

Writing Assembly Language and Machine Language Programs • Assembler – translates mnemonic into hexadecimal machine code and stores in memory address • Compiler – High-level languages • Pascal, FORTRAN, C++, BASIC – get reduced to machine language before execution William Kleitz Digital Electronics with VHDL, Quartus® II Version Copyright © 2006 by Pearson Education, Inc. Upper Saddle River, New Jersey 07458 All rights reserved.

Writing Assembly Language and Machine Language Programs • Assembly language translates directly to machine code • See Table 17 -3 – program in three languages – opcodes William Kleitz Digital Electronics with VHDL, Quartus® II Version Copyright © 2006 by Pearson Education, Inc. Upper Saddle River, New Jersey 07458 All rights reserved.

William Kleitz Digital Electronics with VHDL, Quartus® II Version Copyright © 2006 by Pearson Education, Inc. Upper Saddle River, New Jersey 07458 All rights reserved.

Survey of Microprocessors and Manufacturers • See Table 17 -4 William Kleitz Digital Electronics with VHDL, Quartus® II Version Copyright © 2006 by Pearson Education, Inc. Upper Saddle River, New Jersey 07458 All rights reserved.

William Kleitz Digital Electronics with VHDL, Quartus® II Version Copyright © 2006 by Pearson Education, Inc. Upper Saddle River, New Jersey 07458 All rights reserved.

Summary • A system designer should consider using a microprocessor instead of logic circuitry whenever an application involves making calculations, making decisions based on external stimuli, and maintaining memory of past events. • A microprocessor is the heart of a computer system. It reads and acts on program instructions given to it by a programmer William Kleitz Digital Electronics with VHDL, Quartus® II Version Copyright © 2006 by Pearson Education, Inc. Upper Saddle River, New Jersey 07458 All rights reserved.

Summary • A microprocessor system has three buses: address, data, control. • Microprocessors operate on instructions given to them in the form of machine code (1’s and 0’s). The machine code is generated by a higher-level language like C or assembly language. William Kleitz Digital Electronics with VHDL, Quartus® II Version Copyright © 2006 by Pearson Education, Inc. Upper Saddle River, New Jersey 07458 All rights reserved.

Summary • The Intel 8085 A is an 8 -bit microprocessor. It has 7 internal registers, an 8 -bit data bus, an arithmetic/logic unit, and several input/output functions. • Program instructions are executed inside the microprocessor by the instruction decoder, which issues the machine cycle timing and initiates input/output operations. William Kleitz Digital Electronics with VHDL, Quartus® II Version Copyright © 2006 by Pearson Education, Inc. Upper Saddle River, New Jersey 07458 All rights reserved.

Summary • The microprocessor provides the appropriate logic levels on the data and address buses and takes care of the timing of all control signals output to the connected interface circuitry. • Assembly language instructions are written using mnemonic abbreviations and then converted into machine language so that they can be interpreted by the microprocessor. William Kleitz Digital Electronics with VHDL, Quartus® II Version Copyright © 2006 by Pearson Education, Inc. Upper Saddle River, New Jersey 07458 All rights reserved.

Summary • Higher-level languages like C or Pascal are easier to write than assembly language, but they are not as memory efficient or as fast. All languages must be converted into a machine language matching that of the microprocessor before they can be executed. William Kleitz Digital Electronics with VHDL, Quartus® II Version Copyright © 2006 by Pearson Education, Inc. Upper Saddle River, New Jersey 07458 All rights reserved.