Vous êtes sur la page 1sur 62

BASIC MICROPROCESSORS

RA

BOOKS
TEXT BOOK Microprocessor Architecture Programming and Applications with the 8085 By Ramesh S Gaonkar

RA

Computers
Computers are comprised of primary components that include:
Microprocessor/CPU that performs the arithmetic functions and control the flow of data. Memory that retains information for later use. Input/Output devices that interface with external components and devices.
RA

Elements of the Basic Computer


MPU MPU Arithmetic Logic Unit

Input/Output

Registers

Memory

Control

Clock

RA

Memory
MPU Arithmetic Logic Unit

Input/Output

Registers

Memory

Control

Clock

RA

Memory
Memory is used to hold programming instructions and data for the system to process. There are two basic kinds of memory in computer systems: RAM and ROM
MEMORY

RAM
ROM
RA

RAM
Random Access Memory (RAM) is a type of IC that holds data or instructions on a temporary basis. Binary 1s and 0s are held electrically as highs and lows. This type of memory is volatile, meaning that the contents will disappear when the system is turned off. RAM contains the information that needs to be accessed quickly or repeatedly. Sometimes referred to in digital electronics as read/write memory, its contents can be changed quickly.

RA

ROM
Read Only Memory (ROM) is a type of IC which holds information on a permanent basis. The contents of the ROM isnt altered by the computer system, nor will it disappear when the system is shut down. Typically, ROM contains basic operational code and primary instructions for that particular computer. This memory is considered Non-Volatile.
RA

ROM (other types)


Other types of ROM devices are considered semipermanent. These include flash ROM, EPROM's and EEPROMs. These are permanent memory devices which, through special processes, can be erased and re-written. These devices typically contain custom system information such as user preferences or specific hardware configurations. In some cases these devices are referred to as firmware devices, which describes software programs (instructions and information) written RA into the ICs.

BUSES
MPU Arithmetic Logic Unit

Input/Output

Registers

Memory

Control

Clock
RA

BUSES
A bus is a common connection point, usually in the form of a set of conductors. In computers, information must be moved between various components in a parallel fashion. Buses are connected to each of these devices in common.
Or simply we can say that a BUS is

A collection of wires through which data is transmitted from one part of a computer to another
RA

BUSES

RA

BUSES
There are three main buses on any computer system:
Address bus: Carries destination information for data. Data bus: Carries program instructions or data. Control bus: Responsible for the overall control and synchronization of the computer system.

RA

Input/Output
MPU Arithmetic Logic Unit

Input/Output

Registers

Memory

Control

Clock

RA

Input/output devices (I/O) are devices that supply data, or receive processed data from the computer system.
Input devices include; keyboards, mouse, sensors, switches, scanners, or any other information we may need to provide to the computer. Output devices include: printers, monitors, displays, lights, motors, speakers. or anything else that the computer is controlling.

Input/Output

RA

Input/Output
Typically, the computer is selected based on the degree of input or output information it must handle.

The I/O block is the interface between the computers internal circuitry and the external devices. These I/O devices are responsible for holding the data until the device or computer is ready to retrieve the information. RA

Clock
MPU Arithmetic Logic Unit

Input/Output

Registers

Memory

Control

Clock

RA

The clock is the device that provides the necessary edges and levels for all the device blocks in the computer to operate. Part of the clock circuitry is generally located in the P, with an external connection for an oscillator crystal or other frequency generator. CPUs each have maximum and minimum requirements for oscillator frequency. The P provides clocking to the rest of the RA devices in the computer.

Clock

MPU/CPU
MPU Arithmetic Logic Unit

Input/Output

Registers

Memory

Control

Clock
RA

What Is A Microprocessor
1. Also known as central processing unit CPU

2. An integrated circuit built on a tiny piece of silicon


3. It contains thousands, or even

millions, of transistors, which


are interconnected via superfine

traces of aluminum
RA

What Is A Microprocessor
4.The transistors work together to store and manipulate data so that the microprocessor can perform a wide variety of useful functions 5. The particular functions a microprocessor performs are dictated by software 6. One most common task microprocessors perform is to serve as "brains" inside personal computers (PC), but they deliver "intelligence" to other devices as well
RA

The Microprocessor
Microprocessors are available from many manufacturers and range from 4-bit units for simple device operations to powerful 64- bit microprocessors found in modern desktop computers. Microprocessors are also rated by their processing speeds. As we will see, processing speeds can vary significantly between different microprocessors. Often theyre rated by the clock frequency at which they can operate, or by the number of instructions per second (ips) they RA can process.

MPU Evolution
There have been different stages of evolution for the microprocessors. These stages are referred to as generations. The Ps are classified based on: operational speeds number of bits they can handle their complexity (number of transistors).

RA

MPU Evolution
Model
4004 8008 8080 8085

Year of Introduction
1971 1972 1974 1974

No. of Transistors
2,250 2,500 5,000 6,500

RA

MPU Evolution
PC's
1st. Generation 2nd. Generation 3rd. Generation 4th. Generation 5th. Generation Improved 5th. Generation 6th. Generation Improved 6th. Generation 7th. Generation

CPU
8086 and 8088 80286 80386DX, 80386SX 80486SX, 80486DX, 80486DX2,80486DX4 Pentium, Cyrix 6X86, AMD K5 Pentium MMX, IBM/Cyrix 6x86MX Pentium Pro, AMD K6, Pentium II, AMD K6-2 Mobile P-II & Celeron, Pentium III, AMD K6-3 AMD Athlon, Pentium 4

Year
1978-81 1984 1987-88 1990-92 1993-97 1997-98 1995-1998 1999 1999-2000

# Transistors
29,000 134,000 275,000 1,200,000 up to 3,500,000 up to 6,000,000 up to 9,300,000 up to 28,000,000 up to 42,000,000

RA

Moores Law
Dr. Gordon E. Moore, Chairman Emeritus of Intel Corporation, predicted that no. of transistors per integrated circuit would double every 18 months

RA

RA

Hardware Refers to objects that you can actually touch, like disks, display screens, keyboards, printers, boards and chips
Software Computer instructions or data Anything that can be stored electronically is software. Books provide a useful analogy. The pages and the ink are the hardware, while the words, sentences, paragraphs, and the overall meaning RA are the software

Key Terminology

Key Terminology (Continued)


Program An organized list of instructions that, when executed, causes the computer to behave in a predetermined manner Without programs, computers are useless Data Distinct pieces of information, usually formatted in a special way All software is divided into two general categories: data and programs
RA

Instruction

Key Terminology (Continued)

A basic command to perform a specific task.

Often used to describe most rudimentary programming commands.


Instruction Set The basic set of commands, or instructions, that a microprocessor understands.

One of the principal characteristics that separates for reduced instruction set computer (RISC) from complex instruction set computer (CISC) microprocessors is the size of the instruction setRA

The CPU
The CPU is the main logic unit of the P. It: Executes program instructions Manipulates data in internal registers and caches Performs basic mathematical operations (add, subtract, compliment) Puts addresses on the address bus Reads instructions from the data bus Coordinates the operation of all support ICs and devices Sets the timing for the entire system

RA

The CPU Module


The CPU module contains 3 basic elements:
ALU Control Registers

RA

Registers
MPU Arithmetic Logic Unit

Input/Output

Registers

Memory

Control

Clock

RA

Registers
Registers are a temporary storage location for data. Registers are responsible for holding and handling the data between the ALU, and the Memory & Input/Output devices. The CPU contains many registers, each has specific purpose.

RA

Registers
The arithmetic logic unit utilizes a register, and registers are used keep track of important addresses, such as the location of the next instruction to be executed. The registers retain the location of an area of memory known as a stack. Registers are typically given names such as A, B, C to identify themselves.
RA

ALU
MPU
Arithmetic Logic Unit

Input/Output

Registers

Memory

Control

Clock

RA

The ALU
The ALU (Arithmetic/Logic Unit) is the area of the CPU that performs all arithmetic operations.

The ALU operations are determined by the signals from the Logic Control section.
The data for the ALU is held in the registers.
RA

Clock
MPU Arithmetic Logic Unit

Input/Output

Registers

Memory

Control

Clock

RA

Control

Control

This area directs and controls the flow of information between all the devices. The Control unit fetches data by providing enable/disable signals, address locations and read commands. It decodes and executes operations by providing the appropriate control and address signals to other devices.

Fetch

Execute

RA

Microprocessors are digital devices that are wired to create a specific set of outputs based on their inputs. The input to these devices is in the form of: a program, or a set of instructions, to provide the operation desired. Referred to as the OPCODE. data that needs to be manipulated, referred to as the OPERAND.
RA

Instructions

The 8085 microprocessor

RA

Intel 8085
The Intel 8085 was first introduced in March 1976. Its an 8 bit processor, rated at 5MHz and can perform 0.37MIPS. The 8085 runs on a 5 volt supply.

RA

8085
The 8085 was chosen for our look into the microprocessor:
its still in use its easy to use

The 8085 operates in a similar fashion to more advanced microprocessors.

RA

The internal operation of the 8085 microprocessor

RA

8085 Internal Diagram

RA

RA

ALU (Arithmetic Logic Unit)

RA

ALU
The ALU performs many of the functions that involve arithmetic and logic operations.
Arithmetic:
Add Subtract

Logic
AND OR XOR Incrementing a number

RA

Arithmetic
The Arithmetic component can only perform addition, yet it can perform all other operations: Subtraction: Adding the 2s compliment Multiply: Adding the value multiple times Divide: Subtracting the value multiple times The Arithmetic unit also handles all data manipulation, such as shift left/right, rotate, and the 2s compliment operations.

RA

ALU Results
All ALU results are: stored in a register stored in memory sent to output devices

RA

Registers

RA

Registers
Data registers are locations where data is stored temporarily within the microprocessor. There are a large number of registers in the 8085, each with a specific function.
RA

Registers
Registers are Flip-Flops configured as memory elements.

Explain how this register works.

RA

Program Counter Register


The most important of the registers, the program counter is often referred to as the PC. This register keeps track of the addresses of the instructions as they are being fetched from memory. 16-bit register
RA

Accumulator Register
This is one of the most used registers. Often referred to as the A register. It stores the results of an arithmetic operation or a logic operation. Occasionally labeled Acc. 8-bit Register
RA

Temporary Register
The temporary register is used to transfer data to the ALU.

It usually contains the second value required for arithmetic operations.

RA

General Purpose Registers


The general purpose registers are labeled B, C, D, E, H and L. These registers are used to store various binary values and can be accessed quickly. All are 8-bit, but 2 can be combined to create a 16-bit value (BC, DE, HL). These registers are controllable with programming instructions.
RA

Stack Pointer
The stack pointer is used to point to a memory location in R/W memory called the stack. 16-bit register

RA

The FLAG register is used to keep track of specific results of arithmetic operations. 8085 has five flags These are: the sign of a result (S) whether an overflow occurred (CY) whether the result was zero (Z) the parity of the result (P) (Even parity i.e if result the auxiliary carry status (AC)
D7
S

FLAG Register

D6
Z

D5

D4
AC

D3

D2
P

D1

D0
CY
RA

The 8085: Registers

RA

Control

RA

Control
The control section of the 8085 is responsible for: Timing of all components (within and outside the microprocessor) Clock input Input and Output traffic flow External inputs (for example, reset) External outputs (for example, status) The control section ensures the proper traffic flow on all buses RA