Unit 1 Basics of Microprocessor 1. Microprocessor Microprocessor is a multipurpose programmable integrated device that has computing and decision making capability. This semiconductor IC is manufactured by using LSI technique. It includes all the functional elements of a CPU (Registers, ALU, CU) on a single chip. 2. Features of Microprocessor (a) Size - Small in size due to LSI technique (b) Power consumption - Low power consumption due to MOS technology (c) Versatility - Keeping the some basic hardware, a microprocessor has wide versatility depending on simple change in software program (d) Reliability - High reliability due to low chip count in the system 3. Applications of Microprocessor (i) Single board microprocessor is the simplest and cheapest general purpose microcomputer based system. (ii) Terminals are used for communicate between a computer system and its user. (iii) Used in personal computers. (iv) Used in CAD machines. (v) Used in instrumentation applications like frequency meter, function generator, spectrum analyzer, pathological analyzer etc. (vi) Used in distributed control system. (vii) Used in various office automation. 4. Micro-Controller It is a device that includes microprocessor, memory and I/O signal lines on a single chip fabricated using VLSI technique. 5. Micro Computer It is a computer that is designed using a microprocessor as its CPU. It includes microprocessor, memory and I/O. 6. Monitor program It is a program that interprets the input from a keyboard and converts the input into its binary equivalent. 7. First Microprocessor INTEL 4004 was the first microprocessor introduced by Intel in 1971. Kinshuk Majumder Page 1
8. Block diagram of a Microprocessor Register Section - A set of registers are used for temporary storage of instructions, data and address of data. Arithmetic and Logic unit (ALU) - ALU is a part of microprocessor that performs arithmetic operations (addition, subtraction, multiplication, division, increment, decrement, compare) and logical operations (AND, OR, XOR, NOT, SHIFT/ROTATE, CLEAR). Control Unit (CU) - CU controls and co-ordinates all the sections of microprocessor and other devices connected to the interface section of microprocessor. Interface Section: I/O lines through which microprocessor communicates with user. It contains address bus, data bus, control bus and utility lines. 9. Functional Block diagram of 8085 Microprocessor Kinshuk Majumder Page 2
10. Pin Details of 8085 Microprocessor Address Bus (AB) - 8085 microprocessor has 8 unidirectional signal lines (A 8 -A 15 ) that are used as high order A/B. Multiplex Address/Data Bus - Bidirectional signal lines (AD 0 -AD 7 ) are used as low order address bus and data bus. Control and Status Signal- (i) Address Latch Enable (ALE) - ALE is a positive going pulse generated every time the 8085 within an operation. This signal is used initially to latch the low order address from the multiplex bus and generated a separate set of 8 address lines A 0 -A 7. These control signals may be used to latch the address information in some external register, so that the memory or I/O devices get complete address information even after a part of it is withdrawn by microprocessor. (ii) RD - This active low read control signal is used to select the I/O or memory device is to be read and data are available on the data bus. (iii) WR - This active low write control signal is used to write data into selected memory or I/O location. (iv) IO/M - This is a status signal is used to differentiate between IO and memory operations. When it is high, it indicates I/O operation. When it is low it indicates memory operation. (v) S 1,S 0. These status signals can identify various operations. Kinshuk Majumder Page 3
Power Supply and Clock frequency - (i) VCC - +5v power supply (ii) VSS - Ground (iii) X 1,X 2 :- A crystal (for RC, LC network) is connected at these two pins. The frequency is initially divided by two pins. (iv) CLK OUT Clock output signal can be used as the system clock for other devices. Interrupt and externally initiated signals: (i) INTR - Interrupt request is used as a general purpose interrupt. (ii) INTA - Interrupt acknowledge is used to acknowledge an interrupt. Microprocessor has two or more control signals which suspends the execution of the current program and jump to a subroutine at a predetermined location. (iii) RST7.5, RST6.5, RST5.5 - These restart interrupts transfer the program control to specific memory locations. These vector interrupts has higher priorities than INTR. (iv) TRAP - This is a non-maskable interrupt and has the highest priority. (v) HOLD - This signal indicates DMA controller is requesting the use of the AB and DB. (vi) HLDA - HOLD acknowledge signal acknowledges the HOLD request. (vii) READY - This signal is used to delay microprocessor R/W cycles until a slow responding peripheral is ready to send or accept data. (viii) RESTIN - When the signal on this pin goes low, the PC is set to 0, the buses are tri-stated and microprocessor is reset. 11. Intel 8085 Programmable Registers (i) Accumulator (ACC) - It is used as a source of operands of instruction and as a destination of result of arithmetic and logical operation. The size of the accumulator indicates to the size of microprocessor. (ii) Flag Register (FR) ALU includes five flip-flops which are set or reset according to data conditions in the ACC and the other registers. They are called Sign (S), Zero (Z), Auxiliary Carry (AC), Parity (P), Carry (C). The flags have critical importance in decision making process of microprocessor. It is also called Status Register / Program Status Word / Condition Code Register. (iii) General Purpose Register (GPR) - A register consist a set of binary storage cells or flipflops with parallel reading and/or writing techniques. Registers are used for temporary storage of instruction, data and address of data. 8085 microprocessor has 6 GPRs to store 8 bit data during program execution. The registers are identified as B, C, D, E, H, L. They are also combined as BC, DE, HL to perform 16 bit operations. (iv) Special Purpose Register (SPR) - (a) Stack Pointer (SP) - It is a 16 bit register used as a memory pointer. It points to a memory location in R/W memory, called stack. Stack is an array of registers organized in LIFO manner. (b) Program Counter (PC) - It is used to store the address of instruction to be executed next. The execution of a program is initialized by loading PC by the address of the first instruction to be executed, PC is automatically incremented (unless jump occurs) to point Kinshuk Majumder Page 4
the next instruction i.e. next memory location. Program counter is a 16 bit Special Purpose Register. 12. Intel 8085 Non-Programmable Registers (i) Memory Address Register (MAR) - Contains the address of location in memory. (ii) Memory Buffer Register (MBR) - Contains a word of data when it is to be written in the memory. (iii) Instruction Register (IR) - Fetch instruction from memory to IR temporarily for decoding. (iv) Temporary Register (TR) - Every microprocessor contains some TR for proper functioning of ALU. 13. Bus Structure Buses are the group of lines use for interconnection between various blocks within a computing system. These lines transmit electrical signals, over them and provide communication between these blocks. Each line is capable of transmitting one electrical pulse representing a bit. (i) Address bus- 8085 microprocessor has 16 unidirectional AB, A 15 -A 8 are upper address lines & AD 7 -AD 0 are lower address lines. If the length of the address bus is n then the microprocessor is capable of addressing 2 n memory locations. (ii) Data Bus-8085 microprocessor has 8 bi-directional data bus. AD 7 -AD 0 are multiplexed AB/DB to transfer data between CPU and peripheral devices. Kinshuk Majumder Page 5