Top Banner
A Beginning * Microprocessors
22

A Beginning. * A hardwired system can fulfil only the purpose for which it was designed. It uses fixed logic gates and chips to perform its given function.

Mar 29, 2015

Download

Documents

Ashlyn Burling
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: A Beginning. * A hardwired system can fulfil only the purpose for which it was designed. It uses fixed logic gates and chips to perform its given function.

A Beginning

*Microprocessors

Page 2: A Beginning. * A hardwired system can fulfil only the purpose for which it was designed. It uses fixed logic gates and chips to perform its given function.

*Micros and Hardwired

*A hardwired system can fulfil only the purpose for which it was designed. It uses fixed logic gates and chips to perform its given function. Changing the function of the system requires changing circuitry which is an unrealistic proposition in todays fast changing world.

Page 3: A Beginning. * A hardwired system can fulfil only the purpose for which it was designed. It uses fixed logic gates and chips to perform its given function.

*Micro’s versus Hardwired

Microprocessors have the following advantages

Flexibility

Customizable

Very powerful and continuously adaptable

Far less electronic “real estate” required per function

Page 4: A Beginning. * A hardwired system can fulfil only the purpose for which it was designed. It uses fixed logic gates and chips to perform its given function.

*Micro’s versus Hardwired

Microprocessors do have some small drawbacks

They are in most cases not quite as fast at performing a given function as a dedicated hardwired system would be

There is a learning curve associated with the programming and debugging of microprocessors

Page 5: A Beginning. * A hardwired system can fulfil only the purpose for which it was designed. It uses fixed logic gates and chips to perform its given function.

*Von Nuemman vs Harvard

Architecture

*Microprocessors and microcontrollers are almost always based on one of two different architectures (named below). This short flash movie should go some way to explaining the major differences between them.

*http://www.pictutorials.com/Harvard_vs_Von_Nuemann_Architecture.htm

Page 6: A Beginning. * A hardwired system can fulfil only the purpose for which it was designed. It uses fixed logic gates and chips to perform its given function.

*Von Nuemman vs Harvard

Architecture

*One key difference between Von Nuemman and Harvard architecture is that Harvard systems have a separate bus for loading program instructions. This tends to make Harvard systems able to achieve faster execution speeds for a given clock frequency.

Page 7: A Beginning. * A hardwired system can fulfil only the purpose for which it was designed. It uses fixed logic gates and chips to perform its given function.

*The Bus System

Page 8: A Beginning. * A hardwired system can fulfil only the purpose for which it was designed. It uses fixed logic gates and chips to perform its given function.

*Microprocessor Architecture

Page 9: A Beginning. * A hardwired system can fulfil only the purpose for which it was designed. It uses fixed logic gates and chips to perform its given function.

*Internal Structure of a Z80

Page 10: A Beginning. * A hardwired system can fulfil only the purpose for which it was designed. It uses fixed logic gates and chips to perform its given function.

*Common Features of a

Microprocessor

Data bus

*Carries the data associated with a processing function of the microprocessor, either fetched from memory written to memory or sent to the input/output interfaces

Address bus

*Each memory storage location has a unique address allowing the system to select a unique memory address in the memory. When an address is selected, the code required to select a given space in memory is placed on the address bus

Page 11: A Beginning. * A hardwired system can fulfil only the purpose for which it was designed. It uses fixed logic gates and chips to perform its given function.

*Common Features of a

Microprocessor

Control bus

*Carries signals associated with the control actions of the microprocessor. For example it is necessary for the microprocessor to inform memory devices whether they are to read from or write to memory. The control bus is also used to carry the system clock signals which synchronise all of the actions of the microprocessor. The control bus carries the data generated by the control unit.

Page 12: A Beginning. * A hardwired system can fulfil only the purpose for which it was designed. It uses fixed logic gates and chips to perform its given function.

*Common Features of a

Microprocessor

Memory

ROM = Read Only Memory. This is persistent memory which will remain stored even when the system is switched off

RAM = Random Access Memory, random refers to the fact that any memory address in RAM is as easily accessible as any other.

Page 13: A Beginning. * A hardwired system can fulfil only the purpose for which it was designed. It uses fixed logic gates and chips to perform its given function.

*Common Features of a

Microprocessor

Arithmetic and logic unit

This element is responsible for data manipulation and carries out arithmetic operations of addition, subtraction and logic operations AND, OR, NOT and EXCLUSIVE OR

Page 14: A Beginning. * A hardwired system can fulfil only the purpose for which it was designed. It uses fixed logic gates and chips to perform its given function.

*Common Features of a

Microprocessor

Registers

These are memory locations within the microprocessor and are used to store information involved in program execution. As you can see by studying the diagram. The microprocessor has a few different registers which all serve different functions.

Page 15: A Beginning. * A hardwired system can fulfil only the purpose for which it was designed. It uses fixed logic gates and chips to perform its given function.

*Common Features of a

Microprocessor

Accumulator

Is a temporary storage area for data which the arithmetic and logic unit (ALU) will be working on. If it helps you can think of this unit as a queue of numbers all waiting to be processed. This unit is important when several different types of data are required to complete a program instruction. The data is passed into the ALU processed then passed back to the ALU, where it waits to be directed to other memory locations or input/output latches and interfaces.

Page 16: A Beginning. * A hardwired system can fulfil only the purpose for which it was designed. It uses fixed logic gates and chips to perform its given function.

*Common Features of a

Microprocessor

Registers

These are memory locations within the microprocessor and are used to store information involved in program execution. As you can see by studying the diagram. The microprocessor has a few different registers which all serve different functions.

Page 17: A Beginning. * A hardwired system can fulfil only the purpose for which it was designed. It uses fixed logic gates and chips to perform its given function.

*Common Features of a

Microprocessor

Flag and Status Registers

These registers carry information about the latest result of an arithmetic operation in the ALU. The register contains individual bits known as flags. The flags can indicate the result of the operation whether it was a 1 or a 0, whether a number was carried out, whether the result caused an overflow or whether the program is allowed to be interrupted so an external event can occur.

The program can then take actions based on the value of the flags in the various registers

Page 18: A Beginning. * A hardwired system can fulfil only the purpose for which it was designed. It uses fixed logic gates and chips to perform its given function.

*Common Features of a

Microprocessor

Program Counter

This register is used to allow the microprocessor to keep track of its position in a program. This register contains the address of the memory location that contains the next and program instruction.

Therefore as each instruction is executed the program counter is updated so that it contains the address of the next instruction. This counter is incremented by a 1 each time so that the microprocessor executes the instructions sequentially

Page 19: A Beginning. * A hardwired system can fulfil only the purpose for which it was designed. It uses fixed logic gates and chips to perform its given function.

*Common Features of a

Microprocessor

Memory Address Register

This register is used for storing addresses. For example in an arithmetic operation the address register is loaded with the address of the first number. The data at this address is then moved to the accumulator. The address of the second number is then loaded into the address register and then moved to the accumulator as well.

Page 20: A Beginning. * A hardwired system can fulfil only the purpose for which it was designed. It uses fixed logic gates and chips to perform its given function.

*Common Features of a

Microprocessor

Stack Pointer Register

Another form of address register is the stack pointer register. The stack is a special area in memory where program counter values can be stored when a subroutine is called.

Page 21: A Beginning. * A hardwired system can fulfil only the purpose for which it was designed. It uses fixed logic gates and chips to perform its given function.

*Common Features of a

Microprocessor

Instruction Register

This stores an instruction. After fetching an instruction from the memory, the CPU stores it in the instruction register. It can then be decoded and used to execute an operation.

Page 22: A Beginning. * A hardwired system can fulfil only the purpose for which it was designed. It uses fixed logic gates and chips to perform its given function.