Microprocessors lab Manual

how 8085 microprocessor execute a program microprocessors and interfacing lab manual 8086 trainer kit. and microprocessor and microcontroller lab manual 8086 pdf free download
BellaLloyd Profile Pic
BellaLloyd,France,Professional
Published Date:12-07-2017
Your Website URL(Optional)
Comment
MUFFAKHAM JAH COLLEGE OF ENGINEERING AND TECHNOLOGY (Affiliated to Osmania University) Banjara Hills, Hyderabad, Telangana State INFORMATION TECHNOLOGY DEPARTMENT MICROPROCESSORS LAB MANUAL MICROPROCESSORS LAB 1. VISION OF THE INSTITUTION To be part of universal human quest for development and progress by contributing high calibre, ethical and socially responsible engineers who meet the global challenge of building modern society in harmony with nature. 2. MISSION OF THE INSTITUTION  To attain excellence in imparting technical education from the undergraduate through doctorate levels by adopting coherent and judiciously coordinated curricular and co- curricular programs  To foster partnership with industry and government agencies through collaborative research and consultancy  To nurture and strengthen auxiliary soft skills for overall development and improved employability in a multi-cultural work space  To develop scientific temper and spirit of enquiry in order to harness the latent innovative talents  To develop constructive attitude in students towards the task of nation building and empower them to become future leaders  To nourish the entrepreneurial instincts of the students and hone their business acumen.  To involve the students and the faculty in solving local community problems through economical and sustainable solutions. INFORMATION TECHNOLOGY DEPARTMENT, MJCET I MICROPROCESSORS LAB 3. VISION OF THE DEPARTMENT Fostering a bright technological future by enabling the students to function as leaders in software industry and serve as means of transformation to empower society through ITeS. 4. MISSION OF THE DEPARTMENT To create an ambience of academic excellence through state of art infrastructure and learner-centric pedagogy leading to employability in multi-disciplinary fields. 5. PROGRAM EDUCATIONAL OBJECTIVES 1. The Program Educational Objectives of Information Technology Program are as follows: 2. Graduates will demonstrate technical competence and leadership in their chosen fields of employment by identifying, formulating, analyzing and creating efficient IT solutions. 3. Graduates will communicate effectively as individuals or team members and be successful in varied working environment. 4. Graduates will demonstrate lifelong learning through continuing education and professional development. 5. Graduates will be successful in providing viable and sustainable solutions within societal, professional, environmental and ethical context. INFORMATION TECHNOLOGY DEPARTMENT, MJCET II MICROPROCESSORS LAB 6. PROGRAM OUTCOMES PO1: Engineering knowledge: Apply the knowledge of mathematics, science, engineering fundamentals, and an engineering specialization to the solution of complex engineering problems. PO2: Problem analysis: Identify, formulate, research literature, and analyze complex engineering problems reaching substantiated conclusions using first principles of mathematics, natural sciences, and engineering sciences. PO3: Design/development of solutions: Design solutions for complex engineering problems and design system components or processes that meet the specified needs with appropriate consideration for the public health and safety, and the cultural, societal, and environmental considerations. PO4: Conduct investigations of complex problems: Use research-based knowledge and research methods including design of experiments, analysis and interpretation of data, and synthesis of the information to provide valid conclusions. PO5: Modern tool usage: Create, select, and apply appropriate techniques, resources, and modern engineering and IT tools including prediction and modeling to complex engineering activities with an understanding of the limitations. PO6: The engineer and society: Apply reasoning informed by the contextual knowledge to assess societal, health, safety, legal and cultural issues and the consequent responsibilities relevant to the professional engineering practice. PO7: Environment and sustainability: Understand the impact of the professional engineering solutions in societal and environmental contexts, and demonstrate the knowledge of, and need for sustainable development. PO8: Ethics: Apply ethical principles and commit to professional ethics and responsibilities and norms of the engineering practice. PO9: Individual and team work: Function effectively as an individual, and as a member or leader in diverse teams, and in multidisciplinary settings. PO10: Communication: Communicate effectively on complex engineering activities with the engineering community and with society at large, such as, being able to INFORMATION TECHNOLOGY DEPARTMENT, MJCET III MICROPROCESSORS LAB comprehend and write effective reports and design documentation, make effective presentations, and give and receive clear instructions. PO11: Project management and finance: Demonstrate knowledge and understanding of the engineering and management principles and apply these to one‟s own work, as a member and leader in a team, to manage projects and in multidisciplinary environments. PO 12: Life-long learning: Recognize the need for, and have the preparation and ability to engage in independent and life-long learning in the broadest context of technological change. 7. PROGRAM SPECIFIC OUTCOMES PSO1: Work as Software Engineers for providing solutions to real world problems using Structured, Object Oriented Programming languages and open source software. PSO2: Function as Systems Engineer, Software Analyst and Tester for IT and ITeS. 8. INTRODUCTION TO 8085 MICROPROCESSOR 8.1 Introduction The 8085 microprocessor was made by Intel in mid 1970s. It was binary compatible with 8080 microprocessor but required less supporting hardware thus leading to less expensive microprocessor systems. It is a general purpose microprocessor capable of addressing 64k of memory. The device has 40 pins, require a +5V power supply and can operate with 3 MHz single phase clock. It has also a separate address space for up to 256 I/O ports. The instruction set is backward compatible with its predecessor 8080 even though they are not pin-compatible. INFORMATION TECHNOLOGY DEPARTMENT, MJCET IV MICROPROCESSORS LAB 8.2 8085 Internal Architecture The 8085 has a 16 bit address bus which enables it to address 64 KB of memory, a data bus 8 bit wide and control buses that carry essential signals for various operations. It also has a built in register array which are usually labelled A(Accumulator), B, C, D, E, H, and L. Further special-purpose registers are the 16-bit Program Counter (PC), Stack Pointer (SP), and 8-bit flag register F. The microprocessor has three maskable interrupts (RST 7.5, RST 6.5 and RST 5.5), one Non-Maskable interrupt (TRAP), and one externally serviced interrupt (INTR). The RST n.5 interrupts refer to actual pins on the processor a feature which permitted simple systems to avoid the cost of a separate interrupt controller chip. Control Unit It generates signals within microprocessor to carry out the instruction, which has been decoded. In reality causes certain connections between blocks of the processor be opened or closed, so that data goes where it is required, and so that ALU operations occur. INFORMATION TECHNOLOGY DEPARTMENT, MJCET V MICROPROCESSORS LAB Arithmetic Logic Unit The ALU performs the actual numerical and logic operation such as „add‟, „subtract‟, „AND‟, „OR‟, etc. Uses data from memory and from Accumulator to perform arithmetic and always stores the result of operation in the Accumulator. Registers The 8085 microprocessor includes six registers, one accumulator, and one flag register, as shown in Fig 1. In addition, it has two 16-bit registers: the stack pointer and the program counter. The 8085 has six general-purpose registers to store 8-bit data; these are identified as B, C, D, E, H, and L as shown in Fig 1. They can be combined as register pairs - BC, DE, and HL - to perform some 16-bit operations. The programmer can use these registers to store or copy data into the registers by using data copy instructions. Accumulator The accumulator is an 8-bit register that is a part of arithmetic/logic unit (ALU). This register is used to store 8-bit data and to perform arithmetic and logical operations. The result of an operation is stored in the accumulator. The accumulator is also identified as register A. Flag Registers The ALU includes five flip-flops, which are set or reset after an operation according to 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 most commonly used flags are Zero, Carry, and Sign. The microprocessor uses these flags to test data conditions. Program Counter (PC) This 16-bit register deals with sequencing the execution of instructions. This register is a memory pointer. Memory locations have 16-bit addresses, and that is why this is a 16-bit register. The microprocessor uses this register to sequence the execution of INFORMATION TECHNOLOGY DEPARTMENT, MJCET VI MICROPROCESSORS LAB the instructions. The function of the program counter is to point to the memory address from which the next byte is to be fetched. When a byte (machine code) is being fetched, the program counter is incremented by one to point to the next memory location. Stack Pointer (SP) The stack pointer is also a 16-bit register used as a memory pointer. It points to a memory location in R/W memory, called the stack. The beginning of the stack is defined by loading 16-bit address in the stack pointer. Instruction Register / Decoder This is a temporary storage for the current instruction of a program. Latest instruction is sent to here from memory prior to execution. Decoder then takes instruction and „decodes‟ or interprets the instruction. Decoded instruction is then passed to next stage. Memory Address Register (MAR) It holds addresses received from PC for eg: of next program instruction. MAR feeds the address bus with address of the location of the program under execution. Control Generator It generates signals within microprocessor to carry out the instruction which has been decoded. In reality it causes certain connections between blocks of the processor to be opened or closed, so that data goes where it is required, and so that ALU operations occur. Register Selector This block controls the use of the register stack. Just a logic circuit which switches between different registers in the set will receive instructions from Control Unit. 8085 System Bus The microprocessor performs four operations primarily. INFORMATION TECHNOLOGY DEPARTMENT, MJCET VII MICROPROCESSORS LAB • Memory Read • Memory Write • I/O Read • I/O Write All these operations are part of the communication processes between microprocessor and peripheral devices. The 8085 performs these operations using three sets of communication lines called buses - the address bus, the data bus and the control bus. Address Bus The address bus is a group of 16 lines. The address bus is unidirectional: bits flow only in one direction – from the 8085 to the peripheral devices. The microprocessor uses the address bus to perform the first function: identifying a peripheral or memory location. Each peripheral or memory location is identified by a 16 bit address. The 8085 with its 16 lines is capable of addressing 64 K memory locations. Data Bus The data bus is a group of eight lines used for dataflow. They are bidirectional: data flows in both direction between the 8085 and memory and peripheral devices. The 8 lines enable the microprocessor to manipulate 8-bit data ranging from 00 to FF. Control Bus The control bus consists of various single lines that carry synchronization signals. These are not groups of lines like address of data bus but individual lines that provide a pulse to indicate an operation. The 8085 generates specific control signal for each operation it performs. These signals are used to identify a device type which the processor intends to communicate. INFORMATION TECHNOLOGY DEPARTMENT, MJCET VIII MICROPROCESSORS LAB 8.3 8085 Pin Diagram 8085 Pin Description Properties ƒ Single + 5V Supply ƒ 4 Vectored Interrupts (One is Non Maskable) ƒ Serial In/Serial Out Port ƒ Decimal, Binary, and Double Precision Arithmetic ƒ Direct Addressing Capability to 64K bytes of memory INFORMATION TECHNOLOGY DEPARTMENT, MJCET IX MICROPROCESSORS LAB A8-A15 (Output 3 states) Address Bus carries the most significant 8 bits of the memory address or the 8 bits of the I/0 address; 3 stated during Hold and Halt modes. AD0 - AD 7 (Input/Output 3state) Multiplexed Address/Data Bus carries Lower 8 bits of the memory address (or I/O address) appear on the bus during the first clock cycle of a machine state. It then becomes the data bus during the second and third clock cycles. 3 stated during Hold and Halt modes. ALE (Output) Address Latch Enable occurs during the first clock cycle of a machine state and enables the address to get latched into the on chip latch of peripherals. The falling edge of ALE is set to guarantee setup and hold times for the address information. ALE can also be used to strobe the status information. ALE is never 3 stated. SO, S1 (Output) Data Bus Status: Encoded status of the bus cycle S1 S0 0 0 HALT 0 1 WRITE 1 0 READ 1 1 FETCH RD (Output 3state) READ indicates the selected memory or 1/0 device is to be read and that the Data Bus is available for the data transfer. WR (Output 3state) WRITE indicates the data on the Data Bus is to be written into the selected memory INFORMATION TECHNOLOGY DEPARTMENT, MJCET X MICROPROCESSORS LAB or 1/0 location. Data is set up at the trailing edge of WR. 3 stated during Hold and Halt modes. READY (Input) If Ready is high during a read or write cycle, it indicates that the memory or peripheral is ready to send or receive data. If Ready is low, the CPU will wait for Ready to go high before completing the read or write cycle. HOLD (Input) HOLD indicates that another Master is requesting the use of the address and data buses. The CPU, upon receiving the Hold request, will relinquish the use of buses as soon as the completion of the current machine cycle. Internal processing can continue. The processor can regain the buses only after the Hold is removed. When the Hold is acknowledged, the Address, Data, RD, WR, and IO/M lines are 3stated. HLDA (Output) HOLD ACKNOWLEDGE indicates that the CPU has received the Hold request and that it will relinquish the buses in the next clock cycle. HLDA goes low after the Hold request is removed. The CPU takes the buses one half clock cycle after HLDA goes low. INTR (Input) INTERRUPT REQUEST is used as a general purpose interrupt. It is sampled only using the next to the last clock cycle of the instruction. If it is active, the Program Counter (PC) will be inhibited from incrementing and an INTA will be issued. During this cycle a RESTART or CALL instruction can be inserted to jump to the interrupt service routine. The INTR is enabled and disabled by software. It is disabled by Reset and immediately after an interrupt is accepted. INTA (Output) INTERRUPT ACKNOWLEDGE is used instead of (and has the same timing as) RD during the Instruction cycle after an INTR is accepted. It can be used to activate the 8259 INFORMATION TECHNOLOGY DEPARTMENT, MJCET XI MICROPROCESSORS LAB Interrupt chip or some other interrupt port. RST 5.5/ RST 6.5/ RST 7.5 RESTART INTERRUPTS have the same timing as I NTR except they cause an internal RESTART to be automatically inserted. RST 7.5  Highest Priority RST 6.5 RST 5.5  Lowest Priority The priority of these interrupts is ordered as shown above. These interrupts have a higher priority than the INTR. TRAP (Input) Trap interrupt is a non-maskable restart interrupt. It is recognized at the same time as INTR. It is unaffected by any mask or Interrupt Enable. It has the highest priority of any interrupt. RESET IN (Input) Reset sets the Program Counter to zero and resets the Interrupt Enable and HLDA flipflops. None of the other flags or registers (except the instruction register) are affected The CPU is held in the reset condition as long as Reset is applied. RESET OUT (Output) It indicates that CPU is been reset. It used as a system RESET. The signal is synchronized to the processor clock. X1, X2 (Input) Crystal or R/C network connections to set the internal clock generator X1 can also be an external clock input instead of a crystal. The input frequency is divided by 2 to give the internal operating frequency. INFORMATION TECHNOLOGY DEPARTMENT, MJCET XII MICROPROCESSORS LAB CLK (Output) Clock Output is used as a system clock when a crystal or R/ C network is used as an input to the CPU. The period of CLK is twice the X1, X2 input period. IO/M (Output) IO/M indicates whether the Read/Write is to memory or l/O. It is tristated during Hold and Halt modes. SID (Input) Serial input data line:The data on this line is loaded into accumulator bit 7 whenever a RIM instruction is executed. SOD (output) Serial output data line: The output SOD is set or reset as specified by the SIM instruction. Vcc +5V supply. Vss Ground Reference 8.4 8085 Addressing modes They are mainly classified into four:  Immediate addressing.  Register addressing.  Direct addressing.  Indirect addressing. INFORMATION TECHNOLOGY DEPARTMENT, MJCET XIII MICROPROCESSORS LAB Immediate addressing Data is present in the instruction. Load the immediate data to the destination provided. Example: MVI R, data Register addressing Data is provided through the registers. Example: MOV Rd, Rs Direct addressing It is used to accept data from outside devices to store in the accumulator or send the data stored in the accumulator to the outside device. Accept the data from the port 00H and store them into the accumulator or Send the data from the accumulator to the port 01H. Example: IN 00H or OUT 01H Indirect Addressing In this mode the Effective Address is calculated by the processor and the contents of the address (and the one following) are used to form a second address. The second address is where the data is stored. Note that this requires several memory accesses; two accesses to retrieve the 16-bit address and a further access (or accesses) to retrieve the data which is to be loaded into the register. 8.5. 8085 Microprocessor Trainer Kit 8.5.1 Introduction From the 4 bit microprocessor brought out by Intel in 1971,advancement in technology have been made and now 8 bit ,16 bit , 32 bit and 64 bit microprocessors are available and 64 bit and 32 bit microprocessors are dominating the market. From the age of vacuum tubes and transistors, we are now in the age of microprocessors. Due to its adoptability and intelligence, they are used extensively. The trainer kit is a low cost 8085 based training tool developed specifically for learning the operation of today's microprocessor based systems. INFORMATION TECHNOLOGY DEPARTMENT, MJCET XIV MICROPROCESSORS LAB 8.5.2 Specifications of MPS 85-3: INFORMATION TECHNOLOGY DEPARTMENT, MJCET XV MICROPROCESSORS LAB INFORMATION TECHNOLOGY DEPARTMENT, MJCET XVI MICROPROCESSORS LAB 8.6. 8085 Instruction Set Summary Mnemonic Description Clock Cycles MOV r1 r2 Move register to register 4 MOV M r Move register to memory 7 MOV r M Move memory to register 7 MVI r Move immediate register 7 MVI M Move immediate memory 10 LXI B Load immediate register Pair B & C 10 LXI D Load immediate register Pair D & E 10 LXI H Load immediate register Pair H & L 10 LXI SP Load immediate stack pointer 10 STAX B Store A indirect 7 STAX D Store A indirect 7 LDAX B Load A indirect 7 LDAX D Load A indirect 7 STA Store A direct 13 LDA Load A direct 13 SHLD Store H & L direct 16 LHLD Load H & L direct 16 XCHG Exchange D & E H & L registers 4 PUSH B Push register Pair B & C on stack 12 PUSH D Push register Pair D & E on stack 12 PUSH H Push register Pair H & L on stack 12 PUSH PSW Push A and Flags on stack 12 INFORMATION TECHNOLOGY DEPARTMENT, MJCET XVII MICROPROCESSORS LAB POP B Pop register Pair B & C off stack 10 POP D Pop register Pair D & E off stack 10 POP H Pop register Pair H & L off stack 10 POP PSW Pop A and Flags off stack 10 XTHL Exchange top of stack H & L 16 SPHL H & L to stack pointer 6 JUMP JMP Jump unconditional 10 JC Jump on carry 7/10 JNC Jump on no carry 7/10 JZ Jump on zero 7/10 JNZ Jump on no zero 7/10 JP Jump on positive 7/10 JM Jump on minus 7/10 JPE Jump on parity even 7/10 JPO Jump on parity odd 7/10 PCHL H & L to program counter 6 CALL CALL Call unconditional 18 CC Call on carry 9/18 CNC Call on no carry 9/18 CZ Call on zero 9/18 CNZ Call on no zero 9/18 CP Call on positive 9/18 INFORMATION TECHNOLOGY DEPARTMENT, MJCET XVIII MICROPROCESSORS LAB CM Call on minus 9/18 CPE Call on parity even 9/18 CPO Call on parity odd 9/18 RET Return 10 RC Return on carry 6/12 RNC Return on no carry 6/12 RZ Return on zero 6/12 RNZ Return on no zero 6/12 RP Return on positive 6/12 RM Return on minus 6/12 RPE Return on parity even 6/12 RPO Return on parity odd 6/12 RST Restart 12 IN Input 10 OUT Output 10 INR r Increment register 4 DCR r Decrement register 4 INR M Increment memory 10 DCR M Decrement memory 10 INX B Increment B & C registers 6 INX D Increment D & E registers 6 INX H Increment H & L registers 6 NX SP Increment stack pointer 6 INFORMATION TECHNOLOGY DEPARTMENT, MJCET XIX

Advise: Why You Wasting Money in Costly SEO Tools, Use World's Best Free SEO Tool Ubersuggest.