Docsity

Microprocessor and architecture, Lecture notes of Microprocessors

Partial preview of the text

Download Microprocessor and architecture and more Lecture notes Microprocessors in PDF only on Docsity!

Microprocessors & Interfacing Dr. Bassel Soudan

Chapter 2

Microprocessor Architecture

Microprocessors & Interfacing Dr. Bassel Soudan

Microprocessor Architecture

• The microprocessor can be programmed to

perform functions on given data by writing

specific instructions into its memory.

  • (^) The microprocessor reads one instruction at a time, matches it with its instruction set, and performs the data manipulation specified.
  • (^) The result is either stored back into memory or displayed on an output device.

Microprocessors & Interfacing Dr. Bassel Soudan

The Address Bus

  • (^) 16 bits wide (A 0 A 1 …A 15 )
    • (^) Therefore, the 8085 can access locations with numbers from 0 to 65,536. Or, the 8085 can access a total of 64K addresses.
  • (^) “Unidirectional”.
    • (^) Information flows out of the microprocessor and into the memory or peripherals.
  • (^) When the 8085 wants to access a peripheral or a memory location, it places the 16-bit address on the address bus and then sends the appropriate control signals.

Microprocessors & Interfacing Dr. Bassel Soudan

The Data Bus

  • (^) 8 bits wide (D 0 D 1 …D 7 )
  • (^) “Bi-directional”.
    • (^) Information flows both ways between the microprocessor and memory or I/O.
  • (^) The 8085 uses the data bus to transfer the binary information.
  • (^) Since the data bus has 8-bits only, then the 8085 can manipulate data 8 bits at-a-time only.

Microprocessors & Interfacing Dr. Bassel Soudan

Operation Types in a Microprocessor

• All of the operations of the microprocessor can

be classified into one of three types :

  • (^) Microprocessor Initiated Operations
  • (^) Internal Operations
  • (^) Peripheral Initiated Operations

Microprocessors & Interfacing Dr. Bassel Soudan

Microprocessor Initiated Operations

• These are operations that the microprocessor

itself starts.

• These are usually one of^ 4 operations :

  • (^) Memory Read
  • (^) Memory Write
  • (^) I/O Read (Get data from an input device)
  • (^) I/O write (Send data to an output device)

Microprocessors & Interfacing Dr. Bassel Soudan

The Read Operation

  • (^) To read the contents of a memory location, the following steps take place: - (^) The microprocessor places the 16-bit address of the memory location on the address bus. - (^) The microprocessor activates a control signal called “memory read” which enables the memory chip. - (^) The memory decodes the address and identifies the right location. - (^) The memory places the contents on the data bus. - (^) The microprocessor reads the value of the data bus after a certain amount of time.

Microprocessors & Interfacing Dr. Bassel Soudan

Internal Data Operations

• The 8085 can perform a number of internal

operations. Such as: storing data, Arithmetic &

Logic operations, Testing for condition, etc.

  • (^) To perform these operations, the microprocessor needs an internal architecture similar to the following: Accumulator Flags B C D E H L Program Counter Stack Pointer Address 16 8 Data

Microprocessors & Interfacing Dr. Bassel Soudan

The Internal Architecture

• The Stack pointer

  • (^) The stack pointer is also a 16-bit register that is used to point into memory.
  • (^) The memory this register points to is a special area called the stack.
  • (^) The stack is an area of memory used to hold data that will be retreived soon.
  • (^) The stack is usually accessed in a Last In First Out (LIFO) fashion.

Microprocessors & Interfacing Dr. Bassel Soudan

Externally Initiated Operations

• External devices can initiate (start) one of the 4

following operations:

  • (^) Reset
    • (^) All operations are stopped and the program counter is reset to 0000.
  • (^) Interrupt
    • (^) The microprocessor’s operations are interrupted and the microprocessor executes what is called a “ service routine ”.
    • (^) This routine “handles” the interrupt, (perform the necessary operations). Then the microprocessor returns to its previous operations and continues.

Microprocessors & Interfacing Dr. Bassel Soudan

The Design and Operation of Memory

• Memory in a microprocessor system is where

information (data and instructions) is kept. It can

be classified into two main types:

  • (^) Main memory (RAM and ROM)
  • (^) Storage memory (Disks , CD ROMs, etc.)
  • (^) The simple view of RAM is that it is made up of registers that are made up of flip-flops (or memory elements).
  • (^) The number of flip-flops in a “memory register” determines the size of the memory word.
  • (^) ROM on the other hand uses diodes instead of the flip-flops to permanently hold the information.

Microprocessors & Interfacing Dr. Bassel Soudan

Accessing Information in Memory

• For the microprocessor to access (Read or Write)

information in memory (RAM or ROM), it needs

to do the following:

  • (^) Select the right memory chip (using part of the address bus).
  • (^) Identify the memory location (using the rest of the address bus).
  • (^) Access the data (using the data bus).

Microprocessors & Interfacing Dr. Bassel Soudan

The Tri-State Buffer

• This circuit has two inputs and one output.

  • (^) The first input behaves like the normal input for the circuit.
  • (^) The second input is an “ enable ”.
    • (^) If it is set high, the output follows the proper circuit behavior.
    • (^) If it is set low, the output looks like a wire connected to nothing. Input (^) Output Enable Input (^) Output Enable OR

Microprocessors & Interfacing Dr. Bassel Soudan

The Basic Memory Element

• The basic memory element is similar to a D latch.

• This latch has an input where the data comes in.

It has an enable input and an output on which

data comes out.

D Q EN Data Input Data Output Enable