Size: px
Start display at page:

## Transcription

1 Chapter 1 Microprocessor architecture ECE 3120 Dr. Mohamed Mahmoud

2 Outline 1.1 Computer hardware organization Number System Computer hardware organization 1.2 The processor 1.3 Memory system operation 1.4 Program Execution 1.5 HCS12 Microcontroller

3 1.1.1 Number System - Computer hardware uses binary numbers to perform all operations. - Human beings are used to decimal number system. - Conversion is needed to convert numbers between the internal (binary) and external (decimal) representations. - Octal and hexadecimal numbers have shorter representations than the binary system. - The binary number system has two digits 0 and 1 - The octal number system uses eight digits 0 and 7 - The hexadecimal number system uses 16 digits: 0, 1,.., 9, A, B, C,.., F 1-1

4 - A prefix is used to indicate the base of a number. - Convert % to Hexadecimal = \$45 - Convert \$4F to Binary \$4F = Unsigned numbers are always positive - Signed number B Most significant bit (B) = 1 negative, otherwise positive 1-2

5 1- Unsigned number %1111 = = 15 %0111 = = 7 Unsigned N-bit number can have numbers from 0 to 2 N Signed number %1111 is a negative number. To convert to decimal, calculate the two s complement The two s complement = one s complement +1 = % =%0001 = 1 then %1111 = -1 %0111 is a positive number = = 7. - Unsigned 8-bit number can have numbers from 0 to 255 % to % Signed 8-bit number can have numbers from -128 to +127 to % to %

6 - Signed N-bit number can have numbers from -2 N-1 to 2 N Unsigned 3-bit number can represent numbers from 0 (= %000) to 7 (=111) - Signed 3-bit number can represent numbers from -4 (= %100) to 3 (= %011) Computer does not know whether a bit sequence represents a signed or an unsigned number -> It is the programmer s responsibility! 1-4

7 1.1.2 Computer hardware organization - A Computer consists of hardware and software - The hardware consists of processor, input devices, output devices and memory. Computer Hardware Organization 1-5

8 1- Processor - Also called Microprocessor (MP) or Central Processing Unit (CPU). - Executes programs. - Performs: (1) all of the computational operations and (2) the coordination of the usage of resources of a computer - Ex. can a memory and an input device write data on a shared bus simultaneously? NO, control signals are issued by processor to coordinate the devices operations. 2- Input devices - Used to enter the programs to be executed and the data to be processed into the computer. - Examples: keyboard, keypad, switches, sensors, scanners, bar code readers, etc. 1-6

9 3- Output devices - The results of the operations done by the processor should be displayed or printed on a media so that the user can see them. - Examples: seven segment displays, light emitting diode (LED), liquid crystal displays (LCD), a monitor, etc. 4- Memory - Programs to be executed and data to be processed are stored in memory so that the processor can readily access them. 5- Buses - Address bus: The set of conductor wires that carry address signals. - Data bus: The set of conductor wires that carry data signals - Control bus: The set of conductor wires that carry control signals 1-7

10 Outline 1.1 Computer hardware organization 1.2 The processor 1.3 Memory system operation 1.4 Program Execution 1.5 HCS12 Microcontroller

11 - A processor consists of arithmetic logic unit (ALU), control unit, andregisters. - The ALU performs the arithmetic and logic operations requested by the program. - A simple ALU that can perform only four operations (addition, summation, AND, OR) is shown in Figure

12 - All four operations are performed simultaneously by different circuits whereas the instruction opcode tells the multiplexer to select one of the four units outputs as the result - The adder is used to perform addition and subtraction operations - The ALU is more complicated if the processor designer wants to implement more operations directly in the hardware. Remember how multiplexer works: Selector Select Output Inputs I 0 I 1 I 2 MUX output I 0 I 1 I 2 I 3 11 I 3 1-9

13 The ALU operations:- 1- Opcode = 00 - The comparator output = 0, MUX2 output = CIN, MUX1 output = B, the adder inputs are n-bit A and n-bit B. - The result of the adder is A + B + CIN, CIN is the input carry. - MUX3 selects the output of the adder and the carry A + B+ CIN 1-10

14 2- Opcode = 01 - The comparator output = 1, MUX2 output = 1, MUX1 output = B (one complement of B), the adder inputs are n-bit A and n- bit B. - The result of the adder is A + B + 1 = A - B. Remember B + 1 = - B. B + 1 is the two s complement of B. - MUX3 selects the output of the adder and the carry (called borrow) A + B + 1 = A - B 1-11

15 3- Opcode = 10 MUX3 selects the output of the AND. It is the n bits resulted from performing logic AND operation for A and B. 4- Opcode = 11 MUX3 selects the output of the OR. It is the n bits resulted from performing logic OR operation for A and B. Remember:- X can be zero or one The ALU in Fig. 1.1 can be expanded to perform more instructions 1-12

16 2- Control Unit - The control unit decodes machine codes and performs the operations specified by them. - A machine instruction has a mandated field called the opcode which can tell what operations are needed to execute the instruction. Other fields are optional and used to specify the operands to be operated on. - A machine instruction is a combination of 0s and 1s. - Instruction execution is timed by a clock signal. A clock signal is a square signal. At each cycle, some operations are performed. - A program usually has multiple instructions that are normally stored in sequential locations in memory. 1-13

17 -Aprogram counter (PC) is used to keep track of the address of the instruction to be executed next. - The first step to execute an instruction is to fetch it from the memory location pointed by PC and place it in the instruction register (IR) where it is decoded, and executed. - The result of the decoding process is appropriate control signals to execute the instruction. - Whenever the processor fetches an instruction, the PC will be incremented by the length of that instruction so that it points to thenextinstruction. - Both PC and IR are two registers inside the microprocessor. - The processor may not execute instructions in sequence due to the need to execute instructions based on the condition or the need to repeat a certain group of instructions. -Theprocessorusesconditional and unconditional branch (or jump) instructions to change the program flow. 1-14

18 - Conditional branches are performed when a condition is satisfied, e.g., the previous instruction caused a carry. - After executing an instruction, the condition code register (CCR) is usually automatically updated to reflect the result of the instruction. - The CCR is usually used to make a condition in conditional branch. Each bit in the register is independent and has a different indication. - Example, a zero flag bit is set if the instruction result is zero, a sign flag bit is 1 if the result is negative and so on. -EX.: A=A B jump if A = B If zero flag = 1 jump to

19 3- Registers - A register is a storage location inside the CPU. - A register is used to hold data or address during the execution of an instruction. - A register, very close to the ALU, provides fast access to operands for program execution. - The number of registers varies from processor to processor - Unlike memory, registers are not used to store the program or large data. - Accessing memory is much slower than accessing registers 1-16

20 2- Computer software - Computer programs are known as software - A program is a sequence of instructions - Machine instruction: A sequence of binary digits which can be executed by the processor : A [A] + [B] : A [A] Machine instruction: Hard to understand, enter, debug, and maintain for human being - Assembly language: An assembly instruction is a mnemonic representation of a machine instruction. Examples: ABA ; A [A] + [B] DECA ; A [A]

21 - Assembler: A program that translates an assembly language program to the equivalent machine code that can be executed by the microprocessor. - Compiler: A program that translates a high level programming language to the equivalent machine code. - Source code: A program written in assembly or high-level language 1-18

22 Compiler vs assembler - Compiler is more complex than assembler - Each assembly language instruction is translated to one machine language instruction - But, one statement written in high level language may be translated into tens or hundreds of machine language instructions and this translation is not usually optimal - Assembly language uses mnemonic symbol to represent each machine translation - Using symbols can make programming much easier than using binary machine codes - The microprocessor can execute only machine language instructions 1-19

23 Microprocessor VS Microcontroller - A microprocessor (MP) needs external devices such as memory, I/O ports, etc to run a program. - A microcontroller (MCU) contains a microprocessor, memory and I/O ports within a single chip. - It may also contain timer, serial communication interface, and A/D (analog/digital) and D/A converters - Microcontrollers have been used in almost every product that requires a certain amount of intelligence. - Microcontrollers have been used in printers, modems, MP3 players, cars, home appliances such as washing machines, microwave ovens, etc. 1-20

24 Embedded Systems - An embedded system is a special purpose computer system designed to perform a dedicated function. - Software written for embedded systems is often called firmware and is stored in flash memory chips. - Examples of embedded systems: MP3 players, traffic lights, digital watches 1-21

25 Outline 1.1 Computer hardware organization 1.2 The processor 1.3 Memory system operation 1.4 Program Execution 1.5 HCS12 Microcontroller

26 Semiconductor Memory -Widelyusedinembeddedsystems. - Non-volatile memory does not lose the information when there is no power, but volatile memory does. - Read only memory: the MP can read but cannot write. - Reading memory is nondestructive memory does not lose data when CPU reads. - Writing memory is destructive when the CPU writes data to memory, the old data is written over and destroyed. 1- Random Access Memory (RAM) -Read/writebyMP. - Same amount of time is required to access any location on the same chip. - Dynamic random access memory (DRAM), and Static random access memory (SRAM) are volatile. 1-22

27 - Magneto RAM (MRAM) and Ferroelectric RAM (FRAM) are non-volatile. 2- Read-only memory (ROM): - Nonvolatile. - Mask-Programmed ROM (MROM) is programmed once during manufacture. - Programmable read-only memory (PROM): programmed once by the end user by using a special device. - Erasable programmable ROM (EPROM): Electrically programmable many times by user by using a special device. The whole chip can be erased by ultraviolet light. - Electrically erasable programmable ROM (EEPROM): Electrically Programmable many times by user by using a special device. Electrically erasable by using a special device. can be erased one location, one row, or whole chip in one operation 1-23

28 Flash memory: - Electrically erasable and programmable many times by the MP. - Can erase a block or the whole chip. - The most widely used nonvolatile memory technology. - Most microcontrollers use on-chip flash memory as their program memory. 1-24

29 Memory System Operation - Each memory location has two components: address and contents. - The organization of a memory chip is indicated by m x n, where m is the number of locations in the chip and n indicates the number of bits in one location. - The number of address bits needed for selecting a memory location is Log 2 m - For example a memory chip has 16 bits addressing bits, how many locations are in this memory? 2 16 =64Kbytes - How many addressing bits are needed to point to 64 Kbytes locations? Log 2 64K = 16 bits - The memory data bits are connected to the data bus. - The memory address bits are connected to the address bus. 1-25

30 - Registers are referred to by their names whereas memory locations are referred to by their addresses Byte = 8 bits, Word = 2 bytes = 16 bits, Nibble = 4 bits Kilobyte (KB) = 2 10 bytes =1026 bytes Megabyte (MB) = K 2 Bytes = 2 20 bytes = 1,048,576 bytes Gigabyte (GB) = K 3 Bytes = 2 30 bytes = 1,073,741,824 bytes 1-26

31 Read Operation - RD (Read) in the MP is connected to OE (output enable) in the memory and WR (write) is connected to WE (write enable) - The processor places the address of the memory location that it intends to read on the address bus and asserts the RD signal. (RD = 1 and WR = 0) - After some time, the data stored in the location referred by the address will be out of the memory to the data bus to be read by the MP. - RD and WR are two control signals to inform the memory to read or write. d bits n bits n bits m = 2 d locations 1-27

32 Write Operation - The processor places the address of the location that it intends to write on the address bus. - The processor also places the data that it intends to write on the data bus and asserts the WE signal (RD = 0 and WR =1) - The memory chip stores the data on the data bus in the selected memory location after some time. - If a memory location is one byte but we want to store larger data, e.g., 16-bit number what should we do? Store the data in two locations. To read the data, we read two locations and to write, we write two times. - RD and WR can not be 1 at the same time but can be zeroes. Only one operation can be done at a time. 1-28

33 Outline 1.1 Computer hardware organization 1.2 The processor 1.3 Memory system operation 1.4 Program Execution 1.5 HCS12 Microcontroller

34 - In embedded systems, the program is stored in a nonvolatile memory. - Where does the processor start to execute program after power on? (1) From a fixed location such as address 0 (Atmel microcontroller), or (2) Fetch the starting address from a fixed location in the memory (\$FFFE and \$FFFF in HCS12) - How does the processor update the program counter (PC)? Increment PC by the length of the instruction just executed. - How flow control instructions (such as Jump) are executed? Set the PC with the address of the target instruction. - Flip-flop can store one bit, e.g., D flip-flop When set = 0, Q = 1 at the first rising edge clock When reset = 0, Q = 0 at the first rising edge clock Otherwise: Q = D at the first rising edge clock (CLK) 1-29

35 - The PC is 16-bit register having 16 flip-flops, each flip-flop stores one bit - A common building block for the PC circuit is shown below. 1- Whenever the power is turned on, the flip-flops are reset, PC = \$0000 and the instruction at address \$0000 is the first to be executed. 1-30

36 2- If the instruction being executed is a conditional branch and the branch condition is true, the branch signal will be 1, the MUX1 output is the branch offset ThenewPCvalue=thecurrentPCvalue+thebranchoffset 1 Current PC Offset New PC

37 3- If the instruction being executed is a jump instruction, then PC = Jump target (or the target address) - In Jump instruction, there is no condition and the jump is always taken. Current PC \$ To jump to the instruction at \$3000, PC = \$

38 3- If the instruction being executed is not a program flow control instruction, then The new PC value = the old PC value + the instruction s number of bytes PC is incremented by 1 after each instruction byte is fetched

39 Executing a program 1- The assembler converts the assembly program to machine code and stores it in the memory starting from \$0000. \$0000 ld 0x20, #0 ld 0x21, #20 ld ptr, #0x2000 loop: ld and A, #0x03 bnz next inc 0x20 next: dbnz 0x21,loop 1-34

40 2- Each time the microcontroller is reset, it starts executing from location \$0000 that means PC should be \$ Two phases to execute an instruction:- 3.1 Instruction fetch: - Read the instruction from the memory and store it in the instruction register (IR) - May need more than one reading operation if the instruction is more than one byte. - Update PC to point at the next instruction. How? Increment PC each time a byte of the instruction is read 3.2 Instruction Execution - The control unit decodes the instruction and issues appropriate control signals to execute it. - It may need to read/write the memory. 1-35

41 Instruction ld \$20,#0 (machine code ) Place 0 in data memory at 0x20 1- Fetch instruction: - The Processor places contents of PC (0) on the address bus to read the instruction to be executed. -It reads the first byte (opcode) = \$75. PC is incremented to \$ From the opcode, the control unit recognizes that it needs to read the following two bytes after the opcode. It reads \$20 and \$00 and holds them in IR. PC is incremented after each read operation to be 3 to point at the next executed instruction. 2- Execute the instruction: - Address bus \$20 and Data bus \$00 - WR =1 to write 0 into the memory location \$

42 Initially PC = 0 PC = PC +1 after reading the byte pointed by 0 (or 75) Executing this instruction does not change PC, but jump instruction does. 1-37

43 Instruction ld \$21,#\$14 (machine code ) - Similar to previous instruction. - PC = 0x0006 and write \$14 to memory location \$ Instruction ld ptr,#\$2000 (machine code ) - Load \$2000 into the ptr register 1- Fetch instruction: - The address bus PC value (0x06), request to read. - Opcode = \$90 and PC = \$07. - From the opcode, we need to read the following two locations. Read \$20 and \$00 and PC = 0x Execute instruction: ptr

44 The machine code of the program 1-39

45 Instruction ld (machine code E0) - A = the memory contents pointed to by register ptr - Why this machine instruction needs only one byte?? Because the operands are registers. The instruction does not have immediate values or memory locations. 1- Fetch instruction - Address bus PC value (0x09), request to read, increment PC by 1 to be 0x0A. 2- Execute instruction - Read the memory location pointed by ptr. Address bus ptr and request a read operation. - Store the returned value by the memory in register A. 1-40

46 Instruction and A,#\$03 (machine code 54 03) - And the value 0x03 with accumulator A 1- Fetch instruction - Reading two bytes and update PC to \$0C. 2- Execute instruction - Perform an AND operation on the contents of A and the value 0x03 and store the result in A 1-41

47 Instruction bnz next (machine code is 70 02) - Branch if the result of the last operation is not 0 1- Fetch instruction - Read two bytes where 02 is the branch offset. PC is updated to 0x0E. 2- Execute instruction - If the result of the last instruction is zero, PC = PC + 02, (the jump is taken) - Else does nothing because PC points at the following instruction the branch should not be take. Notice: Some instructions takes more execution time because they do more operations. Usually the instructions that need memory read/write takes more time. 1-42

48 Instruction inc \$20 (machine code 05 20) - Increment the memory location at \$20 by 1 1- Fetch instruction - Read two bytes PC is updated to \$10F. 2- Execute instruction - Read the content of the memory location \$20 and store in a MDR register. - Add one to the MDR register. - Store MDR in memory location \$20: address bus \$20, data bus content of MDR, and requests write operation. 1-43

49 Outline 1.1 Computer hardware organization 1.2 The processor 1.3 Memory system operation 1.4 Program Execution 1.5 HCS12 Microcontroller

50 The HCS12 Features - 16-bit CPU (the operations can be done on 16 bit data) - Maximum operating clock frequency 25 MHz - 0 KB to 4KB of on-chip EEPROM - 2KB to 14KB of on-chip SRAM - 32 KB to 512KB on-chip flash memory -Timer - Serial communication interfaces - 10-bit A/D converter - I/O pins to interface to I/O devices 1-44

51 Two types of registers:- 1- CPU registers: used to perform general purpose operations such as arithmetic, logic, and program flow control. 2- I/O registers: used to configure the operations of the I/O devices and to hold data transferred in and out of the devices - CPU registers do not occupy memory space. - I/O registers have addresses and are treated as memory locations when they are accessed CPU registers: - Some registers are 8 bits others are 16 bits. 1- General-purpose accumulators A and B - Both A and B are 8 bits. - Most arithmetic functions are done on them - A and B can be concatenated to form a single 16-bit register accumulator referred as the D accumulator 1-45

52 The HCS12 CPU Registers 7 A 0 7 B 0 15 D 0 8-bit accumulator A and B or 16-bit double accumulator D 15 X 0 Index register X 15 0 Y Index register Y 15 SP 0 Stack pointer 15 PC 0 Program counter S X H I N Z V C Figure 1.10 HCS12 CPU registers. Condition code register Carry Overflow Zero Negative I Interrupt mask Half-Carry (from bit 3) X Interrupt Mask Stop Disable 1-46

53 When A changes B is unaffected and vice versa, but when D changes both A and B change. 2- Index registers X and Y: 16 bits. Used to hold addresses. They are also used in several arithmetic instructions. 3- Stack pointer (SP): 16 bits. A stack is a first-in-first-out data structure. SP points to the top byte of the stack as shown in figure. 4- Program counter (PC): 16 bits holds the address of the next instruction to be executed. 5- Condition code register (CCR): 8-bit register used to 1- Flags are automatically updated after executing each instruction to reflect the status of the result. 2- Enable and disable interrupts Lower address Higher address Top of stack Push SP Pop 1-47

54 Mohamed Mahmoud Questions

### Chapter 1. Microprocessor architecture ECE Dr. Mohamed Mahmoud.

Chapter 1 Microprocessor architecture ECE 3130 Dr. Mohamed Mahmoud The slides are copyright protected. It is not permissible to use them without a permission from Dr Mahmoud http://www.cae.tntech.edu/~mmahmoud/

### Introduction to Embedded Systems and Chapter 1: Introduction to HCS12/MC9S12. EE383: Introduction to Embedded Systems University of Kentucky

Introduction to Embedded Systems and Chapter 1: Introduction to HCS12/MC9S12 EE383: Introduction to Embedded Systems University of Kentucky Samir Rawashdeh With slides based on material by H. Huang Delmar

### ECED3204: Microprocessor Part I--Introduction

ECED3204: Microprocessor Part I--Introduction Jason J. Gu Department of 1 Outline i. Computer ii. Processor iii. Embedded System iv. Memory v. Program Execution VI. VII. VIII. IX. AVR AVR Memory AVR CPU

### Microcomputer Architecture and Programming

IUST-EE (Chapter 1) Microcomputer Architecture and Programming 1 Outline Basic Blocks of Microcomputer Typical Microcomputer Architecture The Single-Chip Microprocessor Microprocessor vs. Microcontroller

### Chapter 7 Central Processor Unit (S08CPUV2)

Chapter 7 Central Processor Unit (S08CPUV2) 7.1 Introduction This section provides summary information about the registers, addressing modes, and instruction set of the CPU of the HCS08 Family. For a more

### Lecture Objectives. Introduction to Computing Chapter 0. Topics. Numbering Systems 04/09/2017

Lecture Objectives Introduction to Computing Chapter The AVR microcontroller and embedded systems using assembly and c Students should be able to: Convert between base and. Explain the difference between

### Microprocessors/Microcontrollers

Microprocessors/Microcontrollers A central processing unit (CPU) fabricated on one or more chips, containing the basic arithmetic, logic, and control elements of a computer that are required for processing

### 1. INTRODUCTION TO MICROPROCESSOR AND MICROCOMPUTER ARCHITECTURE:

1. INTRODUCTION TO MICROPROCESSOR AND MICROCOMPUTER ARCHITECTURE: A microprocessor is a programmable electronics chip that has computing and decision making capabilities similar to central processing unit

CREATED BY M BILAL & Arslan Ahmad Shaad Visit: www.techo786.wordpress.com Q1: Define microprocessor? Short Questions Chapter No 01 Fundamental Concepts Microprocessor is a program-controlled and semiconductor

### The CPU and Memory. How does a computer work? How does a computer interact with data? How are instructions performed? Recall schematic diagram:

The CPU and Memory How does a computer work? How does a computer interact with data? How are instructions performed? Recall schematic diagram: 1 Registers A register is a permanent storage location within

### THE MICROCOMPUTER SYSTEM CHAPTER - 2

THE MICROCOMPUTER SYSTEM CHAPTER - 2 20 2.1 GENERAL ASPECTS The first computer was developed using vacuum tubes. The computers thus developed were clumsy and dissipating more power. After the invention

### MICROPROCESSOR AND MICROCONTROLLER BASED SYSTEMS

MICROPROCESSOR AND MICROCONTROLLER BASED SYSTEMS UNIT I INTRODUCTION TO 8085 8085 Microprocessor - Architecture and its operation, Concept of instruction execution and timing diagrams, fundamentals of

### Architecture & Instruction set of 8085 Microprocessor and 8051 Micro Controller

of 8085 microprocessor 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

### CHAPTER 5 : Introduction to Intel 8085 Microprocessor Hardware BENG 2223 MICROPROCESSOR TECHNOLOGY

CHAPTER 5 : Introduction to Intel 8085 Hardware BENG 2223 MICROPROCESSOR TECHNOLOGY The 8085A(commonly known as the 8085) : Was first introduced in March 1976 is an 8-bit microprocessor with 16-bit address

### Control Unit: The control unit provides the necessary timing and control Microprocessor resembles a CPU exactly.

Unit I 8085 and 8086 PROCESSOR Introduction to microprocessor A microprocessor is a clock-driven semiconductor device consisting of electronic logic circuits manufactured by using either a large-scale

### 1. Internal Architecture of 8085 Microprocessor

1. Internal Architecture of 8085 Microprocessor Control Unit Generates signals within up to carry out the instruction, which has been decoded. In reality causes certain connections between blocks of the

### MicroProcessor. MicroProcessor. MicroProcessor. MicroProcessor

1 2 A microprocessor is a single, very-large-scale-integration (VLSI) chip that contains many digital circuits that perform arithmetic, logic, communication, and control functions. When a microprocessor

### 2. List the five interrupt pins available in INTR, TRAP, RST 7.5, RST 6.5, RST 5.5.

DHANALAKSHMI COLLEGE OF ENGINEERING DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING EE6502- MICROPROCESSORS AND MICROCONTROLLERS UNIT I: 8085 PROCESSOR PART A 1. What is the need for ALE signal in

### Microprocessor Architecture

Microprocessor - 8085 Architecture 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

### M. Sc (CS) (II Semester) Examination, Subject: Computer System Architecture Paper Code: M.Sc-CS-203. Time: Three Hours] [Maximum Marks: 60

M. Sc (CS) (II Semester) Examination, 2012-13 Subject: Computer System Architecture Paper Code: M.Sc-CS-203 Time: Three Hours] [Maximum Marks: 60 Note: Question Number 1 is compulsory. Answer any four

### MICROPROCESSOR MCQs. 1) What does the microprocessor comprise of? a. Register section b. One or more ALU c. Control unit d.

1) What does the microprocessor comprise of? a. Register section b. One or more ALU c. Control unit 2) What is stored by a register? a. data b. operands c. memory MICROPROCESSOR MCQs 3) Accumulator based

### EE 308: Microcontrollers

EE 308: Microcontrollers AVR Architecture Aly El-Osery Electrical Engineering Department New Mexico Institute of Mining and Technology Socorro, New Mexico, USA January 23, 2018 Aly El-Osery (NMT) EE 308:

### Introduction to Computers - Chapter 4

Introduction to Computers - Chapter 4 Since the invention of the transistor and the first digital computer of the 1940s, computers have been increasing in complexity and performance; however, their overall

### 8051 Microcontrollers

8051 Microcontrollers Richa Upadhyay Prabhu NMIMS s MPSTME richa.upadhyay@nmims.edu March 8, 2016 Controller vs Processor Controller vs Processor Introduction to 8051 Micro-controller In 1981,Intel corporation

### Lecture 2 Microcomputer Organization: Fig.1.1 Basic Components of Microcomputer

Lecture 2 Microcomputer Organization: As discussed in previous lecture microprocessor is a central processing unit (CPU) with its related timing functions on a single chip. A microprocessor combined with

### Menu. word size # of words byte = 8 bits

Menu LSI Components >Random Access Memory (RAM) Static RAM (SRAM) Dynamic RAM (DRAM) Read-Only Memory (ROM) Look into my... See figures from Lam text on web: RAM_ROM_ch6.pdf 1 It can be thought of as 1

### ELEG3923 Microprocessor Ch.0 & Ch.1 Introduction to Microcontroller

Department of Electrical Engineering University of Arkansas ELEG3923 Microprocessor Ch. & Ch. Introduction to Microcontroller Dr. Jingxian Wu wuj@uark.edu OUTLINE 2 What is microcontroller? (Ch..) 85 Microcontroller

### Microcontrollers. Microcontroller

Microcontrollers Microcontroller A microprocessor on a single integrated circuit intended to operate as an embedded system. As well as a CPU, a microcontroller typically includes small amounts of RAM and

### 1 MALP ( ) Unit-1. (1) Draw and explain the internal architecture of 8085.

(1) Draw and explain the internal architecture of 8085. The architecture of 8085 Microprocessor is shown in figure given below. The internal architecture of 8085 includes following section ALU-Arithmetic

### V8-uRISC 8-bit RISC Microprocessor AllianceCORE Facts Core Specifics VAutomation, Inc. Supported Devices/Resources Remaining I/O CLBs

V8-uRISC 8-bit RISC Microprocessor February 8, 1998 Product Specification VAutomation, Inc. 20 Trafalgar Square Nashua, NH 03063 Phone: +1 603-882-2282 Fax: +1 603-882-1587 E-mail: sales@vautomation.com

### Computer Organization

INF 101 Fundamental Information Technology Computer Organization Assistant Prof. Dr. Turgay ĐBRĐKÇĐ Course slides are adapted from slides provided by Addison-Wesley Computing Fundamentals of Information

### Digital IP Cell 8-bit Microcontroller PE80

1. Description The is a Z80 compliant processor soft-macro - IP block that can be implemented in digital or mixed signal ASIC designs. The Z80 and its derivatives and clones make up one of the most commonly

### Chapter 1: Basics of Microprocessor [08 M]

Microprocessor: Chapter 1: Basics of Microprocessor [08 M] It is a semiconductor device consisting of electronic logic circuits manufactured by using either a Large scale (LSI) or Very Large Scale (VLSI)

### COSC 243. Computer Architecture 1. COSC 243 (Computer Architecture) Lecture 6 - Computer Architecture 1 1

COSC 243 Computer Architecture 1 COSC 243 (Computer Architecture) Lecture 6 - Computer Architecture 1 1 Overview Last Lecture Flip flops This Lecture Computers Next Lecture Instruction sets and addressing

### Microcontroller Systems. ELET 3232 Topic 11: General Memory Interfacing

Microcontroller Systems ELET 3232 Topic 11: General Memory Interfacing 1 Objectives To become familiar with the concepts of memory expansion and the data and address bus To design embedded systems circuits

### ELEG3924 Microprocessor

Department of Electrical Engineering University of Arkansas ELEG3924 Microprocessor Ch.2 Assembly Language Programming Dr. Jing Yang jingyang@uark.edu 1 OUTLINE Inside 8051 Introduction to assembly programming

### Dec Hex Bin ORG ; ZERO. Introduction To Computing

Dec Hex Bin 0 0 00000000 ORG ; ZERO Introduction To Computing OBJECTIVES this chapter enables the student to: Convert any number from base 2, base 10, or base 16 to any of the other two bases. Add and

### Microprocessors and Microcontrollers Prof. Santanu Chattopadhyay Department of E & EC Engineering Indian Institute of Technology, Kharagpur

Microprocessors and Microcontrollers Prof. Santanu Chattopadhyay Department of E & EC Engineering Indian Institute of Technology, Kharagpur Lecture - 09 8085 Microprocessors (Contd.) (Refer Slide Time:

### ELEG3923 Microprocessor Ch.2 Assembly Language Programming

Department of Electrical Engineering University of Arkansas ELEG3923 Microprocessor Ch.2 Assembly Language Programming Dr. Jingxian Wu wuj@uark.edu OUTLINE 2 Inside 8051 Introduction to assembly programming

### Pin Description, Status & Control Signals of 8085 Microprocessor

Pin Description, Status & Control Signals of 8085 Microprocessor 1 Intel 8085 CPU Block Diagram 2 The 8085 Block Diagram Registers hold temporary data. Instruction register (IR) holds the currently executing

### 1. Internal Architecture of 8085 Microprocessor

Practical 1 Date : AIM : Introduction Of Microprocessor 8085. 1. Internal Architecture of 8085 Microprocessor Control Unit Generates signals within µp to carry out the instruction, which has been decoded.

### The functional block diagram of 8085A is shown in fig.4.1.

Lecture-13 Internal Architecture of Intel 05A The functional block diagram of 05A is shown in fig.4.1. INTA INTR RST7.5 RST5.5 RST6.5 TRAP SOD SID INTERRUPT SERIAL I/O (Internal Bus) FR(S) IR() B() C()

### UNIT V MICRO CONTROLLER PROGRAMMING & APPLICATIONS TWO MARKS. 3.Give any two differences between microprocessor and micro controller.

UNIT V -8051 MICRO CONTROLLER PROGRAMMING & APPLICATIONS TWO MARKS 1. What is micro controller? Micro controller is a microprocessor with limited number of RAM, ROM, I/O ports and timer on a single chip

### EC2304-MICROPROCESSOR AND MICROCONROLLERS 2 marks questions and answers UNIT-I

EC2304-MICROPROCESSOR AND MICROCONROLLERS 2 marks questions and answers 1. Define microprocessors? UNIT-I A semiconductor device(integrated circuit) manufactured by using the LSI technique. It includes

### 8086 INTERNAL ARCHITECTURE

8086 INTERNAL ARCHITECTURE Segment 2 Intel 8086 Microprocessor The 8086 CPU is divided into two independent functional parts: a) The Bus interface unit (BIU) b) Execution Unit (EU) Dividing the work between

### AVR Microcontrollers Architecture

ก ก There are two fundamental architectures to access memory 1. Von Neumann Architecture 2. Harvard Architecture 2 1 Harvard Architecture The term originated from the Harvard Mark 1 relay-based computer,

### Computer Architecture

Computer Architecture Lecture 1: Digital logic circuits The digital computer is a digital system that performs various computational tasks. Digital computers use the binary number system, which has two

### b. List different system buses of 8085 microprocessor and give function of each bus. (8) Answer:

Q.2 a. Discuss and differentiate between a Microprocessor and a Microcontroller. Microprocessor is an IC which has only the CPU inside them i.e. only the processing powers such as Intel s Pentium 1,2,3,4,

### TUTORIAL Describe the circumstances that would prompt you to use a microprocessorbased design solution instead of a hard-wired IC logic design.

TUTORIAL 1 1. Make a list of 10 products containing microprocessors that we use everyday. Personal computer Television Calculator Elevator Mobile phones MP3 players Microwave ovens DVD players Engine Control

### 1. Internal Architecture of 8085 Microprocessor

Practical 1 Date : AIM : Introduction Of Microprocessor 8085. 1. Internal Architecture of 8085 Microprocessor Control Unit Generates signals within µp to carry out the instruction, which has been decoded.

### 5 Computer Organization

5 Computer Organization 5.1 Foundations of Computer Science Cengage Learning Objectives After studying this chapter, the student should be able to: List the three subsystems of a computer. Describe the

### Chapter TEN. Memory and Memory Interfacing

Chapter TEN Memory and Memory Interfacing OBJECTIVES this chapter enables the student to: Define the terms capacity, organization, and speed as used in semiconductor memories. Calculate the chip capacity

### Intel 8086 MICROPROCESSOR. By Y V S Murthy

Intel 8086 MICROPROCESSOR By Y V S Murthy 1 Features It is a 16-bit μp. 8086 has a 20 bit address bus can access up to 2 20 memory locations (1 MB). It can support up to 64K I/O ports. It provides 14,

### MICROPROCESSOR BASED SYSTEM DESIGN

MICROPROCESSOR BASED SYSTEM DESIGN Lecture 5 Xmega 128 B1: Architecture MUHAMMAD AMIR YOUSAF VON NEUMAN ARCHITECTURE CPU Memory Execution unit ALU Registers Both data and instructions at the same system

### Semiconductor Memories: RAMs and ROMs

Semiconductor Memories: RAMs and ROMs Lesson Objectives: In this lesson you will be introduced to: Different memory devices like, RAM, ROM, PROM, EPROM, EEPROM, etc. Different terms like: read, write,

### EXPERIMENT NO.1. A Microcontroller is a complete computer system built on a single chip.

EXPERIMENT NO.1 AIM: Study of 8051 Microcontroller TOOLS: 8051 kit THEORY: Salient Features of 8051 A Microcontroller is a complete computer system built on a single chip. It contains all components like

### COA. Prepared By: Dhaval R. Patel Page 1. Q.1 Define MBR.

Q.1 Define MBR. MBR( Memory buffer register) A Memory Buffer Register (MBR) is the register in a computers processor that stores the data being transferred to and from the devices It allowing the processor

### Computer Organization and Assembly Language (CS-506)

Computer Organization and Assembly Language (CS-506) Muhammad Zeeshan Haider Ali Lecturer ISP. Multan ali.zeeshan04@gmail.com https://zeeshanaliatisp.wordpress.com/ Lecture 2 Memory Organization and Structure

### Intel 8086 MICROPROCESSOR ARCHITECTURE

Intel 8086 MICROPROCESSOR ARCHITECTURE 1 Features It is a 16-bit μp. 8086 has a 20 bit address bus can access up to 2 20 memory locations (1 MB). It can support up to 64K I/O ports. It provides 14, 16

### Lecture Note On Microprocessor and Microcontroller Theory and Applications

Lecture Note On Microprocessor and Microcontroller Theory and Applications MODULE: 1 1. INTRODUCTION TO MICROPROCESSOR AND MICROCOMPUTER ARCHITECTURE: A microprocessor is a programmable electronics chip

### MICROPROCESSOR BASICS AND RELATED TERMS

MICROPROCESSOR BASICS AND RELATED TERMS Microprocessor: Programmable integrated device that has computing ability and decision making capacity. It is the CPU of computer. A multipurpose, programmable,

### Internal architecture of 8086

Case Study: Intel Processors Internal architecture of 8086 Slide 1 Case Study: Intel Processors FEATURES OF 8086 It is a 16-bit μp. 8086 has a 20 bit address bus can access up to 220 memory locations (1

### Address connections Data connections Selection connections

Interface (cont..) We have four common types of memory: Read only memory ( ROM ) Flash memory ( EEPROM ) Static Random access memory ( SARAM ) Dynamic Random access memory ( DRAM ). Pin connections common

### Module 5 - CPU Design

Module 5 - CPU Design Lecture 1 - Introduction to CPU The operation or task that must perform by CPU is: Fetch Instruction: The CPU reads an instruction from memory. Interpret Instruction: The instruction

### 538 Lecture Notes Week 1

538 Clowes Lecture Notes Week 1 (Sept. 6, 2017) 1/10 538 Lecture Notes Week 1 Announcements No labs this week. Labs begin the week of September 11, 2017. My email: kclowes@ryerson.ca Counselling hours:

### QUESTION BANK. EE 6502 / Microprocessor and Microcontroller. Unit I Processor. PART-A (2-Marks)

QUESTION BANK EE 6502 / Microprocessor and Microcontroller Unit I- 8085 Processor PART-A (2-Marks) YEAR/SEM : III/V 1. What is meant by Level triggered interrupt? Which are the interrupts in 8085 level

### User. Application program. Interfaces. Operating system. Hardware

Operating Systems Introduction to Operating Systems and Computer Hardware Introduction and Overview The operating system is a set of system software routines that interface between an application program

### Lecture1: introduction. Outline: History overview Central processing unite Register set Special purpose address registers Datapath Control unit

Lecture1: introduction Outline: History overview Central processing unite Register set Special purpose address registers Datapath Control unit 1 1. History overview Computer systems have conventionally

### MAHALAKSHMI ENGINEERING COLLEGE TIRUCHIRAPALLI UNIT I THE 8085 & 8086 MICROPROCESSORS. PART A (2 Marks)

MAHALAKSHMI ENGINEERING COLLEGE TIRUCHIRAPALLI-621213. UNIT I THE 8085 & 8086 MICROPROCESSORS PART A (2 Marks) 1. Give the significance of SIM and RIM instruction available in 8085. [NOV/DEC 2006] Instruction

### Memory Expansion. Lecture Embedded Systems

Memory Expansion Lecture 22 22-1 In These Notes... Memory Types Memory Expansion Interfacing Parallel Serial Direct Memory Access controllers 22-2 Memory Characteristics and Issues Volatility - Does it

### Architecture of 8085 microprocessor

Architecture of 8085 microprocessor 8085 consists of various units and each unit performs its own functions. The various units of a microprocessor are listed below Accumulator Arithmetic and logic Unit

### 5 Computer Organization

5 Computer Organization 5.1 Foundations of Computer Science ã Cengage Learning Objectives After studying this chapter, the student should be able to: q List the three subsystems of a computer. q Describe

### CHAPTER 4 MARIE: An Introduction to a Simple Computer

CHAPTER 4 MARIE: An Introduction to a Simple Computer 4.1 Introduction 177 4.2 CPU Basics and Organization 177 4.2.1 The Registers 178 4.2.2 The ALU 179 4.2.3 The Control Unit 179 4.3 The Bus 179 4.4 Clocks

### UNIT - V MEMORY P.VIDYA SAGAR ( ASSOCIATE PROFESSOR) Department of Electronics and Communication Engineering, VBIT

UNIT - V MEMORY P.VIDYA SAGAR ( ASSOCIATE PROFESSOR) contents Memory: Introduction, Random-Access memory, Memory decoding, ROM, Programmable Logic Array, Programmable Array Logic, Sequential programmable

### The x86 Microprocessors. Introduction. The 80x86 Microprocessors. 1.1 Assembly Language

The x86 Microprocessors Introduction 1.1 Assembly Language Numbering and Coding Systems Human beings use the decimal system (base 10) Decimal digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 Computer systems use the

### Description of the Simulator

Description of the Simulator The simulator includes a small sub-set of the full instruction set normally found with this style of processor. It includes advanced instructions such as CALL, RET, INT and

### FIFTH SEMESTER DIPLOMA EXAMINATION IN ENGINEERING/ TECHNOLOGY-MARCH 2014 EMBEDDED SYSTEMS (Common for CT,CM) [Time: 3 hours] (Maximum marks : 100)

(Revision-10) FIFTH SEMESTER DIPLOMA EXAMINATION IN ENGINEERING/ TECHNOLOGY-MARCH 2014 EMBEDDED SYSTEMS (Common for CT,CM) [Time: 3 hours] (Maximum marks : 100) PART-A (Maximum marks : 10) I. Answer all

### 8051 microcontrollers

8051 microcontrollers Presented by: Deepak Kumar Rout Synergy Institute of Engineering and Technology, Dhenkanal Chapter 2 Introduction Intel MCS-51 family of microcontrollers consists of various devices

### Microcontroller Systems

µcontroller systems 1 / 43 Microcontroller Systems Engineering Science 2nd year A2 Lectures Prof David Murray david.murray@eng.ox.ac.uk www.robots.ox.ac.uk/ dwm/courses/2co Michaelmas 2014 µcontroller

### Microprocessor and Microcontroller question bank. 1 Distinguish between microprocessor and microcontroller.

Course B.E(EEE) Batch 2015 Semester V Subject code subject Name UAEE503 Microprocessor and Microcontroller question bank UNIT-1 Architecture of a Microprocessor PART-A Marks: 2 1 Distinguish between microprocessor

### CC411: Introduction To Microprocessors

CC411: Introduction To Microprocessors OBJECTIVES this chapter enables the student to: Use number { base 2, base 10, or base 16 }. Add and subtract binary/hex numbers. Represent any binary number in 2

### Microprocessor Architecture. mywbut.com 1

Microprocessor Architecture mywbut.com 1 Microprocessor Architecture The microprocessor can be programmed to perform functions on given data by writing specific instructions into its memory. The microprocessor

### COMP2121: Microprocessors and Interfacing. Introduction to Microprocessors

COMP2121: Microprocessors and Interfacing Introduction to Microprocessors http://www.cse.unsw.edu.au/~cs2121 Lecturer: Hui Wu Session 2, 2017 1 1 Contents Processor architectures Bus Memory hierarchy 2

### Chapter 4 The Von Neumann Model

Chapter 4 The Von Neumann Model The Stored Program Computer 1943: ENIAC Presper Eckert and John Mauchly -- first general electronic computer. (or was it John V. Atananasoff in 1939?) Hard-wired program

### Chapter 2 Sections 1 8 Dr. Iyad Jafar

Introducing the PIC 16 Series and the 16F84A Chapter 2 Sections 1 8 Dr. Iyad Jafar Outline Overview of the PIC 16 Series An Architecture Overview of the 16F84A The 16F84A Memory Organization Memory Addressing

### STRUCTURE OF DESKTOP COMPUTERS

Page no: 1 UNIT 1 STRUCTURE OF DESKTOP COMPUTERS The desktop computers are the computers which are usually found on a home or office desk. They consist of processing unit, storage unit, visual display

### DEPARTMENT OF ECE QUESTION BANK SUBJECT: MICROPROCESSOR AND MICROCONTROLLER UNIT-1 PART-A (2 MARKS)

DEPARTMENT OF ECE QUESTION BANK SUBJECT: MICROPROCESSOR AND MICROCONTROLLER CODE: EC6504 UNIT-1 1. How many memory locations are available in 8086 microprocessor? 2. What are the flags available in 8086

### The Central Processing Unit

The Central Processing Unit All computers derive from the same basic design, usually referred to as the von Neumann architecture. This concept involves solving a problem by defining a sequence of commands

### EE 5340/7340 Motorola 68HC11 Microcontroler Lecture 1. Carlos E. Davila, Electrical Engineering Dept. Southern Methodist University

EE 5340/7340 Motorola 68HC11 Microcontroler Lecture 1 Carlos E. Davila, Electrical Engineering Dept. Southern Methodist University What is Assembly Language? Assembly language is a programming language

Introduction to MS-DOS Debugger DEBUG In this laboratory, we will use DEBUG program and learn how to: 1. Examine and modify the contents of the 8086 s internal registers, and dedicated parts of the memory

### Chapter One. Introduction to Computer System

Principles of Programming-I / 131101 Prepared by: Dr. Bahjat Qazzaz -------------------------------------------------------------------------------------------- Chapter One Introduction to Computer System

### EE 3170 Microcontroller Applications

EE 3170 Microcontroller Applications Lecture 4 : Processors, Computers, and Controllers - 1.2 (reading assignment), 1.3-1.5 Based on slides for ECE3170 by Profs. Kieckhafer, Davis, Tan, and Cischke Outline

### COMPUTER ORGANIZATION AND ARCHITECTURE

Page 1 1. Which register store the address of next instruction to be executed? A) PC B) AC C) SP D) NONE 2. How many bits are required to address the 128 words of memory? A) 7 B) 8 C) 9 D) NONE 3. is the

### Introduction to Microcontrollers

Introduction to Microcontrollers Embedded Controller Simply an embedded controller is a controller that is embedded in a greater system. One can define an embedded controller as a controller (or computer)

### Basic Processing Unit: Some Fundamental Concepts, Execution of a. Complete Instruction, Multiple Bus Organization, Hard-wired Control,

UNIT - 7 Basic Processing Unit: Some Fundamental Concepts, Execution of a Complete Instruction, Multiple Bus Organization, Hard-wired Control, Microprogrammed Control Page 178 UNIT - 7 BASIC PROCESSING

### Chapter. Computer Architecture

Chapter 4 Computer Architecture Figure 4.1 Input device Central processing unit Main memory Output device Bus Data flow Control Figure 4.2 Central processing unit () Status bits ( ) Accumulator ( ) Index

### Introduction to the 9S12 Microcontroller

Introduction to the 9S12 Microcontroller o Harvard architecture and Princeton architecture o Memory map for a Princeton architecture microprocessor o 68HC12 Address Space o 68HC12 ALU o 68HC12 Programming

### MICROPROCESSOR MICROPROCESSOR. From the above description, we can draw the following block diagram to represent a microprocessor based system: Output

8085 SATISH CHANDRA What is a Microprocessor? The word comes from the combination micro and processor. Processor means a device that processes whatever. In this context, processor means a device that processes