Presentation is loading. Please wait.

Presentation is loading. Please wait.

MICROPROCESSOR DETAILS 1 Updated April 2011 ©Paul R. Godin prgodin gmail.com.

Similar presentations


Presentation on theme: "MICROPROCESSOR DETAILS 1 Updated April 2011 ©Paul R. Godin prgodin gmail.com."— Presentation transcript:

1 MICROPROCESSOR DETAILS 1 Updated April 2011 ©Paul R. Godin prgodin ° @ gmail.com

2 Internal Diagram of a Basic MPU 2

3 ALU (Arithmetic Logic Unit) 3

4 ALU The ALU performs many of the functions that involve arithmetic and logic operations. –Arithmetic: Add Subtract –Logic AND OR XOR Incrementing a number 4

5 The basic Arithmetic component can only perform addition, yet it can perform all other operations: Subtraction: Adding the 2’s compliment Multiply: Adding or shifting the value multiple times Divide: Subtracting or shifting the value multiple times The Arithmetic unit also handles all data manipulation, such as shift left/right, rotate, and the 2’s compliment operations. All ALU results are stored in a register Arithmetic 5

6 Registers 6

7 7

8 Data registers are locations where data is stored temporarily within the microprocessor. There are a larger number of registers in MPUs, each with a specific function. The following slides address the more important registers. 8

9 Program Counter Register The most important of the registers, the program counter is often referred to as the PC. The Program Counter controls the sequence in which instructions are performed. The count indicates the memory location from which information is to be retrieved. 9

10 Accumulator Register This is one of the most used registers. Often referred to as the A or Acc register. It has two main functions: –Hold one of the operands before an arithmetic or a logic operation. –Stores the results after the operation. 10

11 Temporary Register The temporary register is used to transfer data to the ALU. It usually contains the second value required for arithmetic operations. It is often called the Data Register. 11

12 General Purpose Registers The general purpose registers are used to store various binary values and can be accessed quickly. In our example the data is 8-bit but addresses are 16-bit. Two registers can be combined to store a 16-bit (address) value. These registers are controllable with programming instructions. 12

13 Stack Register The stack register is used to temporarily store an address. Special register used for sub-routines and when processing interrupts. Different microprocessors use the stack registers in different manners. Sometimes referred to as the Data Pointer. 13

14 FLAG Register The FLAG register is used to keep track of specific results of arithmetic operations. This includes: –the sign of a result (S) –whether an overflow occurred (CY) –whether the result was zero (Z) –the parity of the result (P) –the auxiliary carry status (AC) Flags are covered in greater detail in another course. 14

15 Instruction Register This register stores and provides instructions to the instruction decoder. The instruction decoder examines the code and determines which operation needs to be performed. 15

16 Index Register Also known as the incrementer/decrementer register, used for indexed addressing mode. It modifies the Operand address. 16

17 Control 17

18 Control The control section of the MPU is responsible for: –Timing of all components (within and outside the microprocessor) –Clock input –Input and Output traffic flow –External inputs (for example, reset) –Outputs (for example, status) The control section ensures the proper traffic flow on all buses (not all control lines are shown on diagram). 18

19 Reset In operation The RESET is an externally applied control signal that stops all operation of the microprocessor, and forces the program counter to return to the start (often all zero’s). This causes the program execution to restart at the first memory location. 19

20 ALE The Address Latch Enable is a control signal used with MPUs that have multiplexed address outputs. It indicates the moment when the lower address is contained on the multiplexed address bus (as opposed to the data). An ALE pulse is generated at the beginning of every machine cycle. The negative edge latches the address in our example. 20

21 Interrupt The microprocessor can be interrupted from its normal operations to execute instructions from another memory location. There are several interrupt inputs, with each having a priority setting and a restart address. The table on the following page an example of the priority of the interrupts and restarts. 21

22 Interrupt Priority Example Interrupt Table for the 8085 Microprocessor 22

23 Interrupt (INTR) Interrupts allows the microprocessor to run a sub- routine, or a different set of instruction. The PC value is pushed to the Stack register When the sub-routine is done, the program continues from where it left off (from the PC). 23

24 TRAP The TRAP command is the highest level interrupt. TRAP causes the CPU to execute the command located at a specific memory location. Typically, TRAP is used for urgent request. For instance, a shut-down routine. 24

25 END of Part 2 ©Paul R. Godin prgodin ° @ gmail.com


Download ppt "MICROPROCESSOR DETAILS 1 Updated April 2011 ©Paul R. Godin prgodin gmail.com."

Similar presentations


Ads by Google