Introduction To Intel 8085 Microprocessor Hardware PDF

Summary

This document provides an introduction to the Intel 8085 microprocessor, discussing its components, architecture, and operations. It covers topics like microprocessors, microcomputers, memory, buses, and the 8085's internal structure. It's geared towards a computer science or related field.

Full Transcript

DERS 2223 ELECTRONIC AND MICROPROCESSOR FUNDAMENTALS CHAPTER 5 - MICROPROCESSOR WEEK 13-15 MICRO-X MICRO-COMPUTER MICRO-PROCESSOR MICRO-CONTROLLER 3 Important Micro-X 3 Microprocessor Multipurpose...

DERS 2223 ELECTRONIC AND MICROPROCESSOR FUNDAMENTALS CHAPTER 5 - MICROPROCESSOR WEEK 13-15 MICRO-X MICRO-COMPUTER MICRO-PROCESSOR MICRO-CONTROLLER 3 Important Micro-X 3 Microprocessor Multipurpose A microcomputer Microcomputer Microprocessor Microcontroller Memory Programmable built on single chip Input/output (I/O) Clock-driven devices Microprocessor Register-based Memory, Communications electronic device Input/output (I/O) between devices components via Additional system bus peripherals such as A/D converter MICROCOMPUTER 4  Programmable machine @ Personal Computer (IBM PC model 5150-1981)  Formed by 3 basic components (subsystem):  Microprocessor  Memory  Input/output (I/O) devices  Components work together/interact with each other to perform a given task MICROCOMPUTER 5  Communications between Memory components via system bus (lines) such as  data bus Micro processor  address bus &  control bus Input / Output Devices MICROCOMPUTER 6  Present day microcomputer can be classified into 4 groups;  Personal computer (PC)  Workstation  Single board  Microcontroller MICROCOMPUTER 7 MICROPROCESSOR 8  A microprocessor is a  Multipurpose  Programmable 40 X1 1 VCC  Clock-driven X2 2 39 HOLD RST OUT 3 38 HLDA SOD 4 37 CLK OUT  Register-based electronic device SID 5 36 RST IN TRAP 6 35 READY  Reads binary instructions from memory RST7.5 7 34 IO/M RST6.5 8 33 S1 8085 RST5.5 9 32 RD  Accepts binary data as input INTR 10 31 WR INTA 11 30 ALE  Processes data according to the AD0 AD1 12 13 29 28 S0 A15 instructions AD2 AD3 14 15 27 26 A14 A13 AD4 16 25 A12  Provides results as output AD5 17 24 A11 AD6 18 23 A10 AD7 19 22 A9 GND 20 21 A8 MICROPROCESSOR 9  Brain of entire microcomputer system  Capable of:  Performingvarious computing functions  Making decisions to change the sequence of programming execution  Control all operations executed within microcomputer  Example : Intel, AMD processor chips MICROPROCESSOR 10 11 MICROCONTROLLER 12  A microcomputer built on single chip  Consists of microprocessor, memory, input/output (I/O) devices & additional peripherals such as A/D converter & timers)  Example : microchip PIC, MOTOROLA, ATMEL chips BIT, BYTES & WORD 13  Computer operates in binary digits (0 and 1), known as bit - electrical voltages level  A combination of 8 bits is called a byte  A group of bits that is executed in one time is called a word  Depends on the microprocessor  8-bit, 16-bit, 32-bit, 64-bit microprocessor BYTES 14  Byte has been used as a unit of measure in microprocessor system  Usually , a memory word is a byte wide  Memories are measured in bytes :  Kilobytes(kB)  Megabytes (MB)  Gigabytes (GB)  Terabytes (TB) UNIT IN BYTE 15 3  1kB= 2 =1024 bytes ≈ 10 10 20  1MB= 2 =1 048 576 bytes ≈ 10 6 30  1GB= 2 = 1 073 741 824 bytes ≈ 109 40  1TB= 2 = 1 099 511 627 776 bytes ≈ 1012 SOFTWARE 16  Instruction  Combination of bit pattern that has specific meaning  Program  Setof instructions written from microprocessor to perform a task  Software A group of program SOFTWARE 17  Each computer manufactured has its own set of instructions written in binary based on the design of the microprocessor  Difficult to write program in sets of binary language (machine language)  Used of English-like words to represent binary instructions (assembly language)  Both language are microprocessor-specific  Considered as low-level language ASSEMBLY LANGUAGE 18  Symbolic codes (mnemonics) for each instruction in machine language  Consists of letter that suggest the operation to be performed by that instruction  Example:  0011 1100 (3CH) = INR A  1000 0000 (80H) = ADD B  Assembly language will be translated into binary instructions using a program called assembler MICROPROCESSOR ARCHITECHTURE ALU REGISTER ARRAY CONTROL UNIT MICROPROCESSOR ARCHITECTURE 20  Internally , the microprocessor is made up of three main units : ALU Register Control Unit Array ALU 21  Arithmetic / Logic Unit  Performs all computing and logic operations such as  Addition  subtraction as well as  AND, OR and XOR CONTROL UNIT 22  Controls what is happening in the microprocessor  Provides the necessary control and timing signals to all operations in the micro-processor as well as its contact to the outside world  Has control lines each of the microprocessor’s logic function : ALU, register, memory, I/O CONTROL UNIT 23  The timing signal such as clock provides synchronization for communication between the components of microprocessor  It also processes interrupt and power-up sequence REGISTER ARRAY 24  A collection of registers within the microprocessor itself  Registers are fast memory element  These registers are used primarily for data storage during program execution  The number and the size of these register differ from one microprocessor to the other REGISTER ARRAY 25  Some registers are general-purpose and some are special-purpose  The general-purpose registers are free to be used by the programmer for any purpose  The special-purpose is the one that used to do specific task such as flag indicator MEMORY 26  Essential components of a microprocessor system  Stores instruction and data for the microprocessor  Various types of memory which can be classified into two groups:  Prime (or main) memory (e.g. RAM, ROM)  Storage memory (e.g. magnetic tape , disk) RAM 27  Random Access Memory  Made of registers  Each register has a group of flip-flop or latches that store bits of information  The flip-flop are called memory cell ROM 28  Read Only Memory  Stores information permanently in form of diodes  A group of diodes can viewed as a register Difference between RAM and 29 ROM  RAM is volatile and is erased when the computer is switched off. ROM is non-volatile and generally cannot be written to.  RAM is used for both read and write while ROM is used only for reading.  RAM needs electricity to flow to retain information while ROM is permanent.  RAM is analogous to a blackboard on which information can be written with a chalk and erased any number of times, while ROM is permanent and can only be read. One example is BIOS (basic input output system) that runs when computer is switched on and it prepares disk drives and processor to load OS from disk. I/O DEVICES 30  Input / Output Devices  System’s means of communicating with outside world  Collectively known as peripherals  Input devices transfer binary information from outside world to microprocessor  E.g. keyboard, mouse, bar code reader, scanner I/O DEVICES 31  Output devices transfer binary information from microprocessor to outside world  E.g. LED, monitor, printer, speaker INTRODUCTION TO INTEL 8085 MICROPROCESSOR HARDWARE THE 8085 MICROPROCESSOR 33  The 8085A(commonly known as the 8085) : Was first introduced in March 1976 is an 8-bit microprocessor with 16-bit address width capable of addressing 64kB of memory has 40 pins Formed with 6500 transistors Requires a +5 volt power supply operates with a 3 MHz frequency THE 8085 MICROPROCESSOR 34  The 8085 is chosen for our look into the microprocessor because:  It is still widely in use  It is easy to use  It has simple architecture and an adequate instruction set that enable students to learn necessary programming concept easily. THE 8085 MICROPROCESSOR 35 X1 1 40 VCC X2 2 39 HOLD RST OUT 3 38 HLDA SOD 4 37 CLK OUT SID 5 36 RST IN TRAP 6 35 READY  The 8085 microprocessor chip RST7.5 RST6.5 7 34 33 IO/M S1 8 has 40 pins. 8085 RST5.5 9 32 RD INTR 10 31 WR INTA 11 30 ALE AD0 12 29 S0 AD1 13 28 A15 AD2 14 27 A14 AD3 15 26 A13 AD4 16 25 A12 AD5 17 24 A11 AD6 18 23 A10 AD7 19 22 A9 GND 20 21 A8 36 THE 8085 MICROPROCESSOR 37  The pins can be grouped into 6 categories: Address bus Data bus Control & Status Power supply & bus frequency Externally initiated & Serial I/O ports acknowledgement signals THE 8085 MICROPROCESSOR 38  Address bus (16 pins)  The 8085 has 16 signal lines (pins) that are used as the address bus for the transferring data to the destination information.  Address bus occupied 16 bits wide, therefore 8085 can access 216 locations (65,536) with numbers, from 0 to 65,535.  These range from 0000 to FFFF and is referred as 64kB of memory space.  These lines are split into 2 segments,  A15 – A8 are unidirectional and used for the most significant bits, called the high-order address, of a 16-bit address.  AD7 – AD0 are used for a dual purpose : as a lower-order address lines and also as a data bus. THE 8085 MICROPROCESSOR 39 Address bus (16 pins)  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.  The high order unidirectional address lines (A15–A8 ) are used to verify the memory address or I/O for one data transfer cycle.  The low-order bidirectional address lines (AD7 – AD0) are multiplexed with data bus.  During the first clock cycle they bring memory address of the low order memory or I/O address. They then become the data bus during the second and third clock cycle. THE 8085 MICROPROCESSOR 40 Address bus (16 pins)  The demultiplexing of AD7 – AD0 is determined by ALE (Address Latch Enable) signal.  When this control signal is going high, the content of the address bus is address bits.  When ALE is low, data is placed on the bus. THE 8085 MICROPROCESSOR 41 Address bus (16 pins) Problem. Calculate the address lines required for an 8 Kbytes memory chip. 8 Kbytes = 8 x 1024 = 8192 memory locations 2x = 8192 x = log 8192/log 2 = 13 address lines THE 8085 MICROPROCESSOR 42 Data bus (8pins-multiplexed with low-order Address Bus)  The signal lines AD7 – AD0 are bidirectional : they serve a dual purpose  They are used as the low-order address bus as well as the data bus. This is known as multiplexing the bus.  The data bus occupy 8 bits wide, used for transferring the data or program instruction.  The data flows both ways between the microprocessor & memory or I/O. THE 8085 MICROPROCESSOR 43 Data bus (8pins-multiplexed with low-order Address Bus)  The 8085 uses the data bus to transfer binary information.  Since the data bus has 8 bits, then the 8085 can manipulate data 8 bits at a time only.  The 8 data lines enable the 8085 to manipulate 8 bits data only at a time, ranging from OO to FF (28 = 256 numbers).  The largest number that can appear on the data bus is 11111111(25510) THE 8085 MICROPROCESSOR 44 Control & Status Bus (6 pins)  This group of signal is used to identify the nature of operation.  Responsible for overall control & synchronization of the system.  This group of signals includes:  Two control signals (RD* and WR*),  Three status signals (IO/M*, S1 and S0)  One special signal (ALE)  RD* - Read : This is a Read control signal (active low). This signal indicates that the selected I/O or memory device is to be read and data are available on the data bus. THE 8085 MICROPROCESSOR 45 Control Bus (6 pins)  WR* - Write : This is a Write control signal (active low). This signal indicates that the data on the data bus are to be written into selected memory or I/O location.  IO/M* : This is a status signal used to differentiate between I/O and memory operations. When it is high, it indicates an I/O operation & when it is low, it indicates a memory operation. This signal is combined with RD* and WR* to generate I/O and memory control signals.  S1 and S0: These status signals, similar to IO/M* can identify various operations, but they are rarely used in small system.  ALE – Address Latch Enable : This is a positive going pulse generated every time the 8085 begins an operation. It indicates that the bits on AD7 - AD0 are address bits. THE 8085 MICROPROCESSOR 46 Power supply & Frequency  The power supply & frequency signals are as follows:  Vcc : +5 V poser supply  Vss : Ground Reference  X1, X2 : A crystal (RC,LC network) is connected at these pins. The frequency is internally divided by two, therefore operate a system at 3 MHz, the crystal should have a frequency of 6 MHz.  CLK OUT (Clock Output) : This signal can be used as the system clock for other devices. THE 8085 MICROPROCESSOR 47 Externally Initiated & Acknowledgement Signals (11 pins)  The 8085 has 5 interrupt signal that can be used to interrupt a program execution. (INTR, RST 7.5, RST 6.5, RST 5.5, TRAP) INTR Interrupt Request Used as a general purpose interrupt RST 7.5 Restart Interrupts These are vectored interrupts that transfer the program RST 6.5 RST 5.5 control to specific memory locations. They have higher priorities than the INTR interrupt. Among these three, the priority order is 7.5, 6.5, 5.5 TRAP Trap This is a non maskable interrupt and has the highest priority INTA Interrupt This is used to acknowledge an interrupt. Acknowledge THE 8085 MICROPROCESSOR 48 Externally Initiated & Acknowledgement Signals  Hold : Indicates that a peripheral such as a *DMA (Direct Memory Access) controller is requesting the use of the address and data buses.  HLDA (Hold Acknowledge) : Acknowledge the HOLD request.  READY : Used to delay the 8085 Read or Write cycles until a slow-responding peripheral is ready to send or accept data. When this signal goes low, the 8085 waits for an integral number of clock cycles until it goes high.  RESET IN : When the signal on this pin goes low, the program counter is set to zero, the buses are tri-stated, and the 8085 is reset.  RESET OUT : This signal indicates that the 8085 is being reset. The signal can be used to reset other devices. *DMA- allows certain hardware subsystems within the computer to access system memory independently of the central processing unit (CPU). THE 8085 MICROPROCESSOR 49 Serial I/O ports (2 pins)  The 8085 has two signals to implement the serial transmission :  SID (Serial Input Data)  SOD (Serial Output Data)  In serial transmission, data bits are sent over a single line, one bit at a time, such as the transmission over telephone lines. THE 8085 MICROPROCESSOR 50 THE 8085 MICROPROCESSOR 51  Internal Diagram of 8085  The internal architecture of the 8085 microprocessor determines how and what operations can be performed with the data.  The operation are :  Store 8 bit data  Perform arithmetic & logical operation  Test for condition  Sequence the execution of instruction  Store data temporary during execution in the defined R/W memory location called the stack.  To perform the operations, microprocessor requires ALU, registers, control logic and internal buses. THE 8085 MICROPROCESSOR 52  Internal Diagram of 8085 THE 8085 MICROPROCESSOR 53  Internal Diagram of 8085  6 main components of 8085 microprocessor : 1. ALU 2. Timing & Control Unit 3. Instruction Register & Decoder 4. Register Array 5. Interrupt Control 6. Serial I/O Control THE 8085 MICROPROCESSOR 54  6 main components of 8085 microprocessor : INTERRUPT SERIAL I/O CONTROL CONTROL ALU REGISTER ARRAY TIMING AND CONTROL UNIT INSTRUCTION REGISTER AND DECODER THE 8085 MICROPROCESSOR 55  Arithmetic Logic Unit (ALU)  The ALU performs many of the function that involve arithmetic and logic operations  Arithmetic  Addition  Subtraction (adding the 2’s complement)  Multiplication (adding the value multiple times)  Division (subtracting the value multiple times)  Logic  AND, OR, XOR, Incrementing a number  The Arithmetic unit also handles all data manipulation, such as shift left/right, rotate, and the 2’s complement operations. THE 8085 MICROPROCESSOR 56  Arithmetic Logic Unit (ALU)  The ALU includes:  Accumulator  Temporary register  Arithmetic & logic circuits.  Status register (flag flip-flops)  ALU → Accumulator  Accumulator is an 8-bit register that is part of the ALU.  It is one of the most used registers, often referred to as the a register and occasionally labeled as Acc.  It stores the 8-bit result of an arithmetic operation or a logic operation. THE 8085 MICROPROCESSOR 57  ALU →Temporary Register  The temporary register is used to hold data during an arithmetic/logic operation.  It is used to transfer data to the ALU and usually contains the second value required for arithmetic operations.  ALU → Status Register (Flag Flip-Flops)  The ALU includes 5 flip-flops, known as the status register or the flag flip- flops  Flags is status register are set to reset after an operation depending on data conditions of the result in the accumulator and other registers.  They are called Zero (Z), Carry (CY), Sign (S), Parity (P) and Auxiliary Carry (AC) flags. THE 8085 MICROPROCESSOR 58  ALU →Status Register (Flag Flip-Flops)  Their bit positions in status registers are shown below and their indications are listed in the table in the next slide. THE 8085 MICROPROCESSOR 59 THE 8085 MICROPROCESSOR 60  ALU →Status Register (Flag Flip-Flops)  The most commonly used flags are S, Z, and CY. The microprocessor uses these flags to test data conditions.  These flags have critical importance in the decision-making process of the microprocessor. The conditions (set or reset) of the flags are tested through programming instructions.  For example, the instruction JC (Jump on Carry) is implemented to change the sequence of a programming when CY flag is set.  The systematic understanding of flags is essential in writing assembly language program. THE 8085 MICROPROCESSOR 61  Timing & Control Unit  The timing & control unit of the 8085 is responsible for: Timing of all components (within and outside the microprocessor) Clock input Input and Output traffic flow on all busses External inputs (for example, reset) External outputs (for example, status)  Ensures proper traffic flow on all buses THE 8085 MICROPROCESSOR 62  Instruction Register & Decoder  When an instruction is fetched from memory, it is loaded in the instruction register.  The decoder decodes the instruction & establishes the sequence of events to follow.  The instruction register is not programmable & cannot be accessed through any instructions. THE 8085 MICROPROCESSOR 63  Register Array  Data registers are locations where data is stored temporary within the microprocessor.  These are a larger number of registers in the 8085, each with a specific function. Register are flip-flops configured as memory elements THE 8085 MICROPROCESSOR 64  These are a few types of register such as:  Accumulator In ALU  Status register  Temporary register  General-purpose register  Stack pointer  Program counter  Memory address register THE 8085 MICROPROCESSOR 65  Register Array → General Purpose Register  The 8085 has six 8-bit general purpose registers to store 8-bit data, identified as B, C, D, E, H and L.  These registers are used to store various binary values and can be accessed quickly.  They can be combined as register pairs, identified as BC, DE and HL to perform some 16-bit operations.  These registers are controllable with programming instructions where programmer can use these registers to store or copy data into the registers by using data copy instructions.  Register pair HL is usually used as memory pointing operation. THE 8085 MICROPROCESSOR 66  Register Array → Stack Pointer  Stack pointer, often referred to as SP, is also a 16-bit register used as a memory pointer.  It points to a memory location called the stack. The beginning of the stack is defined by loading a 16-bit address in the SP.  Used to store the address of the skipped address during CALL function.  SP stores (pushes) the address onto a memory area that is often called the stack and removes (pops) the address back whenever required in reverse order.  It uses First In Last Out (FILO) and Last In First Out (LIFO) operation. THE 8085 MICROPROCESSOR 67  Register Array → Program Counter  Program counter, often referred to as PC, is a 16-bit register used to hold memory addresses.  The microprocessor uses PC register to sequence the execution on the instructions.  The function of PC register is to point to the memory address from which the next byte is to be fetched.  This register keeps track of the addresses of the instructions as they are being fetched from memory.  When a byte (machine code) is being fetched, the program counter is incremented by one to point to the next memory location.  The register holds the next address of the memory to the current address that is being executed. THE 8085 MICROPROCESSOR 68  End