Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
RA
REF. BOOKS
TEXT BOOK 1.Microprocessor Architecture Programming and Applications with the 8085 By Ramesh. S. Gaonkar. 2.Microprocessors and Microcomputers By B Ram
RA
RA
RA
INPUT UNIT
CPU
(CENTRAL PROCESSING UNIT)
OUTPUT UNIT
MEMORY
RA
BLOCK DIAGRAM:
It consists of four sections: CPU, Memory, Input and Output CPU: It is a brain of a computer and it is capable of performing, computing and making during decision program execution. Basically, the CPU controls the operation of the computer. Input Unit: It allows the computer to take in data from the outside world. Ex. Keyboard, Teletype, a video unit, a card reader, A/D converter etc.
RA
Output Unit: It transfers the processed data from the CPU to the output devices such as LEDs, CRTs, Video monitors, Line printers etc.
Memory: It stores the information of program and data. It provides the information to the CPU whenever necessary Thus a digital computer is an interconnected system of processors (CPU), memories and input/output devices.
RA
BASIC BLOCKS OF A MICROCOMPUTER A microcomputer has three basic blocks: 1. Central Processing Unit (CPU). 2. Memory Unit. 3. Input/Output Unit.
RA
ROM
RAM
INPUT
OUTPUT
Microprocessor
Memory element
I/O Unit
Microcomputer CPU
RA
RA
KEY TERMINOLOGY
BIT: An abbreviation for binary digit 0 or 1 BYTE: A group of eight bits NIBBLE: A group of four bits WORD: A group of bits that the computer recognises INSTRUCTION: It is a command to perform a particular task. MNEMONIC: PROGRAM MACHNINE LANGUAGE
RA
KEY TERMINOLOGY
ASSEMBLY LANGUAGE LOW LEVEL LANGUAGE HIGH LEVE LANGUAGE SOURCE CODE COMPILER INTERPRETER ASSEMBLER
RA
KEY TERMINOLOGY
MANNUAL ASSEMBLY ASCII EXTENDED ASCII PERATING SYSTEM MONITOR PROGRAM
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 are the software
Key Terminology
RA
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 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 set
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
Input/Output
Registers
Memory
Control
Clock
RA
Memory
MPU Arithmetic Logic Unit
Input/Output
Registers
Memory
Control
Clock
RA
RA
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 NonVolatile.
RA
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.
Input/Output
Output devices include: printers, monitors, displays, lights, motors, speakers. or anything else that the computer is controlling.
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 devices in the computer.
RA
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 can process.
RA
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
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
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/write 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.
Instructions
RA
NUMBER SYSTEMS
DECIMAL BINARY OCTAL HEXADECIMAL CONVERSION OF DECIMAL TO BINARY & VICE VERSA CONVERSION OF DECIMAL TO OCTAL & VICE VERSA CONVERSION OF DECIMAL TO HEXADECIMAL & VICE VERSA CONVERSION OF OCTAL TO BINARY AND VICE VERSA CONVERSION OF HEXADECIMAL TO BINARY & VICE VERSA.
RA
RA
Intel 8085
The Intel 8085 was first introduced in March 1976. Its an 8 bit, NMOS Microprocessor. Its a 40 pin I.C. package fabricated on a single LSI chip. The 8085 runs on a 5 volt supply. Its clock speed is about 3 to 5MHz and can perform 0.37MIPS. It has 80 basic instructions and 246 opcodes.
RA
8085
The 8085 was chosen for our look into the microprocessor:
its still in use its easy to use
RA
RA
RA
RA
RA
The ALU performs many of the functions that involve arithmetic and logic operations. Arithmetic: Add Subtract Increment decrement Logic: AND OR XOR Complement (NOT) Left shift, Right shift, Rotate Left, Rotate Right Clear etc.
ALU
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
All ALU results are: stored in an Accumulator Later they can be stored in memory or sent to output devices
RA
Registers are used by the microprocessor for temporary storage and manipulation of data and instructions. Data remain in the registers till they are sent to the memory or I/O devices. In a large computer the number of registers is more and hence the program requires less transfer of data to/from memory.
RA
Registers
Registers
RA
RA
Accumulator
The register A in the 8085 is an Accumulator or Acc. 8-bit Register It is used hold one of the operands of an arithmetic or logical operation and the other operand may be in the memory or in one of the Gen. Purpose Register. It stores the results of an arithmetic operation or a logic operation. Exceptional cases: Some Logical inst. Which need only one operand. It is held in Acc. The typical inst. DAD rp for 16-bit addition. The 16bit operand are kept in H-L pair and the other in the BC or D-E pair. The result is placed in the H-L pair.
RA
FLAG Register
D7 S
Sign Status
D6 Z
Zero Status
D5 X
D4 AC
Aux. Carry Status
D3 X
D2 P
Parity Status
D1 X
D0 CY
Carry Status
X- Undefined Bits
RA
FLAG Register
The Intel 8085 contains five flip-flops to serve as status flags. The flip-flops are set or reset according to the conditions which arise during an arithmetic or logical operation. The five status flags of Intel 8085 are: Carry Flag (CY) Parity Flag (P) Auxiliary Carry Flag (AC) Zero Flag (Z) RA Sign Flag (S)
FLAG Register CY-Carry flag: If an arithmetic operation results in carry, the carry flag is set; otherwise it is reset. P-Parity flag: After an arithmetic or logical operation, if the result has an even number of 1s, the flag is set. If it has odd number of 1s, the flag is reset. AC-Auxiliary Carry Flag : In arithmetic operation, when a carry is generated by digit D3 and passed on to digit D4, the AC flag is set. The flag is used only internally for BCD operations and is not available for the programmer to change the sequence of program with jump inst. Z-Zero flag: The Zero flag is set if the ALU operation result in 0 and the flag is reset if the result is not 0 S-Sign flag: After the execution of an arithmetic or logical operation, if bit D7 of the result (Usually in the Acc) is 1, the Sign flag is set. This flag is used with signed numbers.
RA
Program Counter (PC) Register It is a 16-bit special-purpose register. It is used to hold memory address of the next instruction to be executed. It keeps track of the addresses of the instructions as they are being fetched from memory. The microprocessor increments the contents of the PC during execution of an instruction, so that it points to the address of the next instruction in the program at the end of the execution of an instruction.
RA
Stack Pointer
It a 16-bit register. This is used to point to a memory location in R/W memory called the stack. Stack is set of memory location set aside by the programmer to store/retrieve the contents of the Accumulator, Flags, Program counter and General Purpose Registers during the program execution. Stack works on LIFO (Last-in-first-out) principle. SP holds the address of the stack top element of data stored in the stack
RA
2604
2605 2606
SP X X
2607
2607
RA
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 not accessible to programmer Instruction Register It is an 8-bit reg. It holds the opcode or instruction code of the instruction which is being decoded and executed. It is not accessible to programmer.
RA
RA
RA