SIR.C.R.R.COLLEGE OF ENGINEERING DEPT. OF ELECTRONICS AND INSTRUMENTATION ENGG. EIE-328: MICROPROCESSOR LABORATORY 3/4 B.E. EIE: SECOND SEMESTER

Similar documents

(2) Explain the addressing mode of OR What do you mean by addressing mode? Explain diff. addressing mode for 8085 with examples.

8085 INSTRUCTION SET INSTRUCTION DETAILS

INSTRUCTION SET OF 8085

Subject Code: Model Answer Page No: /25

Assembly Language Programming of 8085

MAHALAKSHMI ENGINEERING COLLEGE TIRUCHIRAPALLI

SAMPLE STUDY MATERIAL

Assembly Language Programming of 8085

MSMF GATE CENTRE. Sub: MICROPROCESSORS. Time: 50min Date: Marks:33

EC2304-MICROPROCESSOR AND MICROCONROLLERS 2 marks questions and answers UNIT-I

LIST OF PROGRAMS. Prg. Name of the Program. 1 Study of Pin Diagram of Study of Architecture of Study of 8085 Kit.

Introduction to Assembly Language Programming (Instruction Set) 1/18/2011 1

INSTITUTE OF ENGINEERING AND MANAGEMENT, KOLKATA Microprocessor

MAHALAKSHMI ENGINEERING COLLEGE TIRUCHIRAPALLI UNIT I THE 8085 & 8086 MICROPROCESSORS. PART A (2 Marks)

Practical Course File For

م.م. ماجد عيدان. Introduction to microprocessor and microcomputer

Its Assembly language programming

S.R.M. INSTITUTE OF SCIENCE & TECHNOLOGY SCHOOL OF ELECTRONICS & COMMUNICATION ENGINEERING

Delhi Noida Bhopal Hyderabad Jaipur Lucknow Indore Pune Bhubaneswar Kolkata Patna Web: Ph:

UNIT I. Differences between: Microcomputer, Microprocessor and Microcontroller

Architecture & Instruction set of 8085 Microprocessor and 8051 Micro Controller

EE309: Computer Organization, Architecture and MicroProcessors. sumantra/courses/up/up.html GND HIGH ORDER ADDRESS BUS

Unit 1 8 BIT MICROPROCESSOR ARCHITECTURE

UNIT 1 REFERENCE 1 PREPARED BY S.RAVINDRAKUMAR, LECT/ECE, CHETTINAD COLLEGE OF ENGG AND TECH, KARUR

ELECTRICAL ENGINEERING

GATE Exercises on Microprocessors

Delhi Noida Bhopal Hyderabad Jaipur Lucknow Indore Pune Bhubaneswar Kolkata Patna Web: Ph:

1. INTRODUCTION TO MICROPROCESSOR AND MICROCOMPUTER ARCHITECTURE:

ROEVER ENGINEERING COLLEGE

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION (Autonomous) (ISO/IEC Certified) MODEL ANSWER

1. What is Microprocessor? Give the power supply & clock frequency of 8085?

Control Unit: The control unit provides the necessary timing and control Microprocessor resembles a CPU exactly.

PERIPHERAL INTERFACING Rev. 1.0

SIR C.R.REDDY COLLEGE OF ENGINEERING ELURU DIGITAL ELECTRONICS & MICROPROCESSOR LAB MANUAL 2/4 CSE: II- SEMESTER

MICROPROCESSOR BASICS AND RELATED TERMS

1. What is microprocessor? It is a program controlled semi conductor device (IC), which fetches, decodes and execute instructions.

COPYRIGHT IS NOT RESERVED BY AUTHORS. AUTHORS ARE NOT RESPONSIBLE FOR ANY LEGAL ISSUES ARISING OUT OF ANY COPYRIGHT DEMANDS

EXPERIMENT NO. 1 THE MKT 8085 MICROPROCESSOR TRAINER

Micro Processor & Micro Controllers

CS2259-MICROPROCESSOR AND MICROCONTROLLER LABORATORY MANUAL

1. Internal Architecture of 8085 Microprocessor

1. Internal Architecture of 8085 Microprocessor

EXAMPLE PROGRAMS 8085

Lecture Note On Microprocessor and Microcontroller Theory and Applications

Delhi Noida Bhopal Hyderabad Jaipur Lucknow Indore Pune Bhubaneswar Kolkata Patna Web: Ph:

LABORATORY MANUAL. PROGRAMME: B.Tech SEMESTER /YEAR: 3rd year 5th Semester SUBJECT CODE: CS592 SUBJECT NAME: Microprocessor & Microcontroller Lab

DHANALAKSHMI COLLEGE OF ENGINEERING DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING YEAR : III SEM : VI

Programming of 8085 microprocessor and 8051 micro controller Study material

EKT222 Miroprocessor Systems Lab 5

Microprocessor Micro Syllabus BSc. CSIT, IOST, TU. Microprocessor

Vidyalankar T.E. Sem. V [EXTC] Microprocessors and Microcontrollers I Prelim Question Paper Solution V SS (GND)

G. Pullaiah College of Engineering and Technology: Kurnool Department Of Electronics and Communication Engineering

Microprocessor and Microcontroller question bank. 1 Distinguish between microprocessor and microcontroller.

2. List the five interrupt pins available in INTR, TRAP, RST 7.5, RST 6.5, RST 5.5.

The 8085 Instruction Set

Instruction set of 8085

CHETTINAD COLLEGE OF ENGINEERING AND TECHNOLOGY

Basics of Microprocessor

QUESTION BANK. EE 6502 / Microprocessor and Microcontroller. Unit I Processor. PART-A (2-Marks)

1 MALP ( ) Unit-1. (1) Draw and explain the internal architecture of 8085.

Microprocessor Architecture


8085 Microprocessor Programs

PERIPHERAL INTERFACING Rev. 1.0

The advantages of registers over memory locations are as follows:

VALLIAMMAI ENGINEERING COLLEGE

INDEX. 1 Study of intel 8085 micropeocessor kit. 2 Program to find addition of two 8 bit no. 3 Program to find subtraction of two 8 bit no.


AE66/AC66/AT66/ AE108/AC108/AT108 MICROPROCESSORS & MICROCONTROLLERS

Computer Organization

CHAPTER 5 : Introduction to Intel 8085 Microprocessor Hardware BENG 2223 MICROPROCESSOR TECHNOLOGY

MGM S Jawaharlal Nehru Engineering College

The due date for submitting this assignment has passed. 1) How many times will the following loop be executed? Depends on the initial value of A

DE60/DC68 MICROPROCESSORS & MICROCONTROLLERS JUN 2015

BHARATHIDASAN ENGINEERING COLLEGE. III Year / V Semester / EEE MICROPROCESSORS AND MICROCONTROLLERS (R-2013)

8051 Overview and Instruction Set

Chapter 1: Basics of Microprocessor [08 M]

QUESTION BANK CS2252 MICROPROCESSOR AND MICROCONTROLLERS

MICROPROCESSOR AND MICROCONTROLLER

Q. P. Code : b. Draw and explain the block dig of a computer with microprocessor as CPU.

9/25/ Software & Hardware Architecture

Valliammai Engineering College

EXPERIMENT-1 AIM: Familiarization of different keys of 8085 microprocessor kit and its memory map. APPARATUS: 8085 kit. DIAGRAM:

Microcontroller Intel [Instruction Set]

SN8F5000 Family Instruction Set

Question Bank Microprocessor and Microcontroller

MICROPROCESSOR MICROPROCESSOR. From the above description, we can draw the following block diagram to represent a microprocessor based system: Output

B.C.A 2017 MICROPROCESSOR AND ASSEMBLY LANGUAGE MODULE SPECIFICATION SHEET. Course Outline

4 Categories Of 8085 Instructions That Manipulate Data

Vidyalankar T.E. Sem. V [ETRX] Microprocessors and Microcontrollers I Prelim Question Paper Solution

1. Internal Architecture of 8085 Microprocessor

The functional block diagram of 8085A is shown in fig.4.1.

Assembly language Programming

(2½ Hours) [Total Marks: 75]

Interrupts. by Rahul Patel, Assistant Professor, EC Dept., Sankalchand Patel College of Engg.,Visnagar

DE60/DC68 MICROPROCESSORS & MICROCONTROLLERS JUNE 2013

Sunday, April 25, 2010


XII HSC - BOARD - MARCH

Transcription:

SIR.C.R.R.COLLEGE OF ENGINEERING DEPT. OF ELECTRONICS AND INSTRUMENTATION ENGG. EIE-328: MICROPROCESSOR LABORATORY 3/4 B.E. EIE: SECOND SEMESTER (AS PER UNIVERSITY SYLLABUS) LIST OF EXPERIMENTS 1. UNDERSTANDING INSTRUCTIONS OF 8085 MICROPROCESSOR. 2. BLOCK MANIPULATION. 3. ARITHMETIC OPERATIONS. 4. MULTIPLICATION. 5. HEXADECIMAL COUNTER 6. DECIMAL COUTER. 7. HEXADECIMAL CLOCK. 8. DIGITAL CLOCK. 9. FLASHING DISPLAYS. 10. KEYBOARD MANAGEMENT. 11. INTERRUPTS. 12. INTERFACING D/A CONVERTER. ****** 1

SIR.C.R.R.COLLEGE OF ENGINEERING DEPT.OF ELECTRONICS AND INSTRUMENTATION ENGG. EIE 328: MICROPROCESSOR LABORATORY 3/4 B.E. EIE: SECOND SEMESTER (LIST OF EXPERIMENTS CONDUCTING IN THE LABORATORY) CYCLE-1: 1. STUDY OF 8085 INSTRUCTION SET. 2. BLOCK MANIPULATION. 3. ADDITION AND SUBTRACTION OF BCD NUMBERS. A) ADDITION OF TWO 8- BIT BCD NUMBERS. B) SUBTRACTION OF TWO 8- BIT BCD NUMBERS 4. A) MULTIPLICATION OF TWO 8-BIT NUMBERS. B) MULTIPLICATION OF TWO 16-BIT NUMBERS. 5. BINARY TO BCD CONVERSION 6. BINARY TO ASCII CODE CONVERSION CYCLE-2: 7. HEXADECIMAL COUNTER 8. DECIMAL COUNTER 9. DIGITAL CLOCK. 10. HEXADECIMAL CLOCK 11. INTERFACING OF DAC TO 8085 MICROPROCESSOR A). SQUARE WAVE B). TRIANGULAR WAVE 12. FLASHING DISPLAY 13. KEYBOARD INTERFACING 2

EXTRA EXPERIMENTS: 14. INTERFACING OF DAC TO 8085 MICROPROCESSOR A) POSITIVE RAMP B) NEGATIVE RAMP C) POSITIVE STAIR CASE D) NEGATIVE STAIR CASE 3

EXPT.NO: 1 Date: STUDY OF 8085 INSTRUCTION SET Aim: To study the brief description of 8085 instruction set. Apparatus: 1.8085 Microprocessor Kit. 2. Power Supply Instruction Set: The 8085 instruction set can be classified into five functional categories: 1. Data Transfer Instructions. 2. Arithmetic Instructions. 3. Logical Instructions. 4. Branching Instructions. 5. Machine Control Instructions. Data Transfer Instructions: Mnemonics Examples Operation MVI R, 8-bit MVI B, 4F h The contents of 8-bit data are transfered to register MOV R d, R s MOV B, A Moves the contents of register R s into Register R D LXI R p, 16-bit LXI B, 2050H The 16-bit data which is specified in the Operand are transferred to the register Pair R p OUT 8-bit OUT 01H Moves accumulator data to o/p port IN 8-bit IN 07H Accept 8-bit data from an I/p port into 4

the accumulator LDA 16-bit LDA 2050H The contents of the memory location whose address is specified in the operand are transferred to the accumulator STA 16-bit STA 2070H The contents of the accumulator are transferred to the memory location whose address is specified in the operand LDAX Rp LDAX B The contents of the memory location whose address is specified in register pair are transferred to accumulator STAX R p STAX D The contents of the accumulator are transferred to the memory location whose address is specified in the register pair MOV R, M MOV B, M Copy the byte into register from the memory specified by the address in the HL pair MOV M, R MOV M, C Copy the byte from register into the memory specified by the address in the HL pair 5

Arithmetic Instructions: Mnemonics Examples Operation ADD R ADD B Add the contents of register B to A ADI 8-bit ADI 37H Add 8-bit data to the contents of A ADD M ADD M Add the contents of memory to A SUB R SUB C Subtract the contents of C register from A SUI 8-bit SUI 7FH Subtract 8-bit data from the contents of A SUB M SUB M Subtract contents of memory from A INR R INR D Increment the register contents by one INR M INR M Increment the contents of memory DCR R DCR B Decrement the contents of a register DCR M DCR M Decrement the contents of memory INX R p INX H Increment the contents of a register pair HL DCX R p DCX B Decrement the contents of a register pair BC Logical Instructions: Mnemonics Examples Operation ANA R ANA B Logically AND the contents of a register with the contents of A ANI 8-bit ANI 34H Logically AND 8-bit data with the contents of A ANA M ANA M Logically AND the contents of memory with the contents of A ORA R ORA E Logically OR the contents of a register with the contents of A 6

ORI 8-bit ORI 35H Logically OR 8-bit data with the contents of A ORA M ORA M Logically OR the contents of memory with the contents of A XRA R XRA B Exclusive-OR the contents of a register with the contents of A XRI 8-bit XRI 57H Exclusive-OR the 8-bit data with the contents of A XRA M XRA M Exclusive-OR the contents of memory with the contents of A CMP R CMP B Compare the contents of register with the contents of A CPI 8-bit CPI 23H Compare the 8-bit data with the contents of A Branch Instructions: Mnemonics Examples Operation JMP 16-bit JMP 2050H Change the program sequence to the specified 16-bit address JZ 16-bit JZ 2080H Change the program sequence to the specified 16-bit address if ZF=1 JNZ 16-bit JNZ 2090H Change the program sequence to the specified 16-bit address if ZF=0 JC 16-bit JC 2010H Change the program sequence to the specified 16-bit address if CF=1 7

JNC 16-bit JNC 2034H Change the program sequence to the specified 16-bit address if CF=0 CALL 16-bit CALL 2075H Change the program sequence to the location of a subroutine RET RET Return to the calling program after Completing the subroutine sequence Machine Control Instructions: Mnemonics Examples Operation HLT HLT Stop processing and wait NOP NOP Do not perform any operation Result: The instructions of 8085 are studied with examples. 8

Viva voce: 1. List the components of a computer? 2. Explain the functions of each component of a computer? 3. What is a Microprocessor? What is the difference between processor and a CPU? 4. Explain the difference between a Microprocessor and a Microcomputer? 5. Explain SSI, MSI and LSI? 6. Define BIT, BYTE and WORD? 7. How many bytes make a word of 32bits? 8. Specify the number of registers in a 2K memory chip? 9. Calculate the number of registers in a 64K memory board? 10. Explain the difference between the Assembly level and Machine languages? 11. What is an assembler? 12. What are low level and high level languages? 13. Explain the difference between compiler and interpreter? 14. What are the advantages of an assembly language in comparison with highlevel languages? 15. What is an ASCII code? 16. Identify the difference between ASCII and extended ASCII codes? 17. What is an operating system? 18. What are the primary operations of microprocessor? 19. Why the data bus is bi-directional? 20. What is the function of an Accumulator? 9

EXPT.NO: 2 Date: BLOCK MANIPULATION Aim: To write a program to transfer a block of data bytes from source memory location to destination memory location. Apparatus: 1.8085 Microprocessor Kit. 2. Power Supply. Source Code: Mnemonics Label Opcode Operand LXI MOV INX LXI H,8050 h C,M H D,8070 h Loop MOV A,M XCHG MOV M,A XCHG INX INX DCR JNZ H D C Loop HLT 10

Algorithm: Step 1: Start Step 2: Get memory address of count Step 3: Count in register C Step 4: Source address of data in HL pair Step 5: Destination address of data in DE pair Step 6: Data from source address to ACC Step 7: Destiny address in Hl pair Step 8: Data to destiny address Step 9: Source address in HL pair Step 10: Source address of next data Step 11: Destiny address of next data Step 12: Decrement count Step 13: Jump to label LOOP Step 14: stop Result: The data block is transferred from source memory to destination memory Source Address : Destination Address : I/P Data : O/P Data : 11

Viva voce: 1. What is a microcontroller? 2. What is a bus? 3. What is a nibble? 4. Why address bus is unidirectional? 5. What is the difference between CPU and ALU? 6. What is meant by manual assembly? 7. Give examples to low-level and high-level languages? 8. What is the interpreter? 9. What is the difference between source code and object code? 10. What is the mnemonic? 11. Explain the function of RESET pin in 8085? 12. Differentiate the registers available in 8085? 13. What is the function of stack pointer? 14. Classify the instruction set? 15. Give examples to machine control and branching instructions? 16. How many bits are there in 8-bytes? 17. Define instruction 18. What is the function of assembler? 19. Difference between assembler and compiler? 20. Can the DE pair be used as memory? 12

EXPT.NO: 3(A) ADDITION OF TWO 8-BIT BCD NUMBERS Date: Aim: To add two 8-bit BCD numbers and store the result. Apparatus: 1.8085 Microprocessor Kit. 2. Power Supply. Source Code: Mnemonic Label Opcode Operand MVI LXI MOV INX ADD B, 00h H, 8200h A, M H M DAA JNC INR LABEL1 STA MOV STA LABEL1 B 8500h A, B 8501h HLT 13

Algorithm: Step 1: Start Step 2: Clear the register B. Step 3: Load the address of first number in HL register pair. Step 4: Moved the first number into Accumulator. Step 5: Increment the HL pair for second number. Step 6: Add the second number with the first number. Step 7: Decimal adjust the Accumulator. Step 8: If there is no carry go to step10. Step 9: If there is a carry increment the register C. Step10: Store the contents of Accumulator in memory. Step11: Move the contents of register B into Accumulator. Step12: Store the contents of Accumulator in the next memory location. Step13: Stop. Result: The two 8-bit numbers are added and the out put is stored in specified memory locations Input Address : Out put Address : I/P Data : O/P Data : 14

EXPT.NO: 3 (B) SUBTRACTION OF TWO 8-BIT BCD NUMBERS Date: Aim: To subtract two 8-bit BCD numbers and store the result Apparatus: 1.8085 Microprocessor Kit. 2. Power Supply Source Code: Mnemonics Label Opcode Operand LXI H,8502h MVI A,99h SUB M INR A DCX H ADD M DAA STA 8503h HLT Algorithm: Step1: Start the program Step2: Load the address of second number in HL register pair Step3: Move the 99H in accumulator Step4: Subtract memory contents from accumulator contents 15

Step5: Increment accumulator contents by one Step6: Decrement register pair HL contents by one Step7: Add M to the accumulator Step8: Adjust the accumulator Decimal point Step9: Store the result in specified memory Step10: End of the program Result: The subtraction of two 8-bit numbers is performed and the result is stored in specified memory location. Input Address : Out put Address : I/P Data : O/P Data : 16

Viva voce: 1. Define op-code and operand? 2. What will be the status of the processor bus during idle state? 3. What is wait state? 4. What the difference is between wait and bus idle states? 5. What is implied or implicit addressing mode? 6. What is DAA? 7. What happens when 8085 is interrupted by INTR input? 8. location to be empty? 9. What is meant by a dedicated bus? 10. How are t 11. What is memory map? 12. Is the address bus is unidirectional or bi-directional? Why? 13. 14. 15. What is meant by stack? 16. How can a user have access to the general- 17. How many address lines are required to provide 4G-byte memory? 18. How many different instructions are possible in an 8-bit processor? 19. Explain possible instruction to clear the accumulator? 20. Give the significance of RST instructions? 17

EXPT.NO: 4 (A) MULTIPLICATION OF TWO 8-BIT NUMBERS Aim: To perform multiplication of two 8-bit numbers. Apparatus: 1.8085 Microprocessor Kit. 2. Power Supply. Source Code: Mnemonic Label Opcode Operand LDA MOV LDA MOV XRA MOV 8500h D, A 8501h C, A A B, A LABEL2 ADD C JNC INR LABEL1 B LABEL1 DCR D JNZ STA MOV STA LABEL2 8502h A, B 8503h HLT 18

Algorithm: Step 1: Start. Step 2: Enter the first number into the Accumulator. Step 3: Move the contents of Accumulator into register D. Step 4: Enter the second number into Accumulator. Step 5: Move the contents of Accumulator into register C. Step 6: The contents of Accumulator are made zero. Step 7: The contents of register B are made zero. Step 8: Add the contents of register C with Accumulator. Step 9: If there is no carry go to step11. Step10: If there is a carry increment the register B. Step11: Decrement the contents of register D by one. Step12: If the content of register D is not zero go to step8. Step13: Store the contents of the Accumulator in destination address if the content of register D is zero. Step14: Move the contents of register B to Accumulator. Step15: Store the contents of Accumulator into next memory location. Step16: Stop. Result: The two 8-bit numbers are multiplied and the result is stored in specified memory locations. Input Address : Out put Address : I/P Data : O/P Data : 19

EXPT.NO: 4 (B) MULTIPLICATION OF TWO 16-BIT NUMBERS Date: Viva voce: 1. What is a flag? 2. What happens to 8085 when it is reset? 3. What is a program counter? 4. What is the hardware interrupts of 8085? 5. Which interrupt has highest priority in 8085? 6. What is the clock frequency of 8085? 7. Explain the need to de-multiplex the bus AD 7 -AD 0? 8. Explain how to de-multiplex the AD 7 -AD 0 bus using a latch? 9. Specify the crystal frequency required for an 8086 system to operate at 1.1MHz? 10. What is a machine cycle, how many T-states present in one machine cycle? 11. Can an input port and an output port have the same port address? 12. Specify the two 8085 signals that are used to latch data in from an output port? 13. What are the control signals necessary in the memory-mapped I/O? 14. Explain why a latch is used for an output port, but a tri-state buffer can be used for an input port? 15. How many I/O devices can be accessed by 8085? 16. What about the hardware requirements in memory-mapped and peripheral I/O? 17. What are the instructions available in memory-mapped and peripheral I/O? 18. What about the execution speed in memory-mapped and peripheral I/O? 20

19. What about the address bits in memory-mapped and peripheral I/O? 20. Give the significance of auxiliary carry flag? EXPT.NO: 5 HEXADECIMAL COUNTER Aim: To write a program to design a hexadecimal counter such that it is reset at desired number stored in a memory location and start the program again. Apparatus: 1.8085 Microprocessor Kit. 2. Power Supply Equivalents: String upaddr Equivalent 06BCh Source Code: 21

Mnemonics Label Opcode Operand Start LXI SP,FF00h LXI H, FFFFh St05 PUSH H SHLD CALL CALL POP DCX JMP FFF7h Upaddr Delay H H St05 Delay MVI B,02 d100 LXI H, FFFFh d105 DCX H MOV ORA JNZ DCR JNZ A,M L d105 B d100 RET Algorithm: Step1: Define origin and equivalents 22

Step2: Start the program Step3: Load FF00H into the stack pointer. Step4: Load FFFFH into the register pair HL. Step5: The content of the register pair is pushed in to the stack. Step6: Store the L register contents in FFF7h and H register contents in FFF8 Step7: Call subroutine from 06BCh memory. Step8: Call subroutine for delay Step9: Pop the content of the register pair HL, which was saved, from the stack Step10: Decrement the HL reg pair contents by one Step11: Jump to the label St05 Step12: Move 02h in to the D register Step13: Load FFFFH into the register pair HL Step14: Decrement HL register pair contents bye one Step15: Move HL registers contents in to the accumulator Step16: ORed the L register contents with accumulator Step17: If no zero, jump to d105 Step18: Decrement the B register contents bye one Step19: If no zero, jump to d100 Step20: Return to the main program. Result: 23

Viva voce: 1. What is DAD and what are the flags affected when it is executed? 2. Explain DI and EI? 3. Explain SIM and RIM instructions? 4. State the differences between STA and STAX instructions? 5. State the difference between ADD and ADC instructions? 6. What is NOP? State its importance? 7. What is meant by debugger? 8. What are the flags effected when RLC is executed? 9. What are the differences between subroutines and macros? 10. What are the different addressing modes? 11. What is the addressing mode of NOP? 12. Give the examples to indirect addressing mode? 13. Difference between CPI and CPM? 14. How many T-states required to JNZ instruction? 15. Write a program to provide a 1ms time delay? 16. How many T-states are required to provide 50ms delay? 17. Explain the CALL instruction? 18. How many T-states are required to execute CALL instruction? 19. How can the lower nibble be masked of an 8-bit data? 20. What is meant by PSW? 24

EXPT.NO: 6 DECIMAL COUNTER Aim: To write a program to design a decimal counter such that it is reset at desired number stored in a memory location and start the program again. Apparatus: 1.8085 Microprocessor Kit. 2. Power Supply Equivalents: String upaddt Equivalent 06DCh Source Code: Mnemonics 25

Label Opcode Operand Start LXI SP, FF00h MVI A,00 PUSH STA CALL CALL POP PSW FFF9h Upddt Delay PSW ADI 01 DAA JMP St05 Delay MVI B,10 d100 LXI H, FFFFh d105 DCX H MOV ORA JNZ DCR JNZ A,M L d105 B d100 RET Algorithm: Step1: Define origin and equivalents Step2: Start the program 26

Step3: Load FF00H in to the stack pointer. Step4: Initialize the accumulator Step5: The content of the reg pair is pushed in to the stack. The contents of Status flags are also pushed into the stack. The contents of the stack Pointer is decrement by two to indicate new SP Step6: Store the FFF9h memory contents in accumulator Step7: Call subroutine from 06DCh memory Step8: Call subroutine for delay Step9: Pop the contents from PSW Step10: Add 01H to the accumulator Step11: Decimal adjust accumulator Step12: Jump to the label St05 Step13: Move 10H in to the B register Step14: Load FFFFh contents In to HL register pair Step15: Decrement HL reg pair Step16: Move HL reg pair to the accumulator Step17: ORed the L reg with the accumulator Step18: If no zero, Go to D100 Step19: Decrement the register B contents by one Step20: If no zero, jump to D105 Step21: Return to the main program RESULT: 27

EXPT.NO: 7 DIGITAL CLOCK Aim: Write a program to display real time digital clock Apparatus: 1.8085 Microprocessor Kit. 2. Power Supply 3. Real time clock generator module 4. FRC connector 28

Equivalents: String Equivalent String Equivalent String Equivalent hrs 8400 min 8401 sec 8402 caw 2B cwd 9B Port c 2A datdis 036E ffc2 FFC2 addisp 0363 zero 00 one 01 twofou 24 sixty 60 sixone 61 -- -- Source Code: Mnemonics Label Opcode Operand LX1 MVI OUT LDA MOV CALL LDA MOV LDA CALL LDA INR SP,ffc2 A,cwd cwa hrs E,A addisp min C,A Sec datdis Sec A 29

STA sec Loop0 IN Port c CPI JNZ Zero Loop0 Loop1 IN Port c CPI JNZ LDA MOV MOV PUSH CALL POP MOV INR One Loop1 Sec B,A A,B B Datdis B A,B A DAA MOV STA CPI JZ JMP B A sec sixone loop3 Loop0 Loop3 MVI A, Zero STA sec 30

CALL LDA INR Datdis Min A DAA MOV STA MOV LDA MOV PUSH PUSH CALL POP POP MVI STA MOV CPI JZ JMP C,A min E,A hrs D,A B D adddisp D B A, one sec A,C Sixty Loop4 Loop0 Loop4 MVI A, zero STA LDA min hrs 31

INR A DAA 27 STA CPI JZ MVI hrs twofou Loop5 C, zero Loop2 LDA min MOV LDA MOV PUSH PUSH CALL POP POP JMP MVI STA STA JMP E,A hrs D,A D B addisp B D loop0 A, zero hrs min Loop2 Algorithm: step1: Start the program step2: Intialize stack pointer 32

step3: Intialize 8255 and set al ports as input ports step4:load Accumulator with hrs step5: Load Accumulator with contents of min step6: call addisp step7: Load Accumulator with min contents step8: Load Accumulator with sec contents step9 : call datdis step10: Load accumulator with Sec contents step11: Increment seconds by one step12: store the data in 8402 H step13: Receive pulse through port C PCO and check for zero level step14: Jump on zero to loop 1 step15: Seconds loop Step16:Display updated seconds Step17: Decimal adjust accumulator Step18:Store content of accumulator in address of sec Step19: Compare 61H with content of accumulator Step20: If 60 seconds how lapsed go to minutes loop Step21: store contents of accumulator in address pointed sec Step22:Call subroutine datdis Step23: Minutes loop Step24: Increment minutes by one Step25: store content of accumulator in address painted by sec Step26:call datdis 33

Step27: Minutes loop Step28:Increment minutes loop Step29: Decimal adjust accumulator Step30: Store minutes Step31: load hrs from 8400 H and ready to display Step32: Now is the time to display, hrs and min since hrs and min display uses address display Step33: Move 01H into accumulator Step34: Compare 60H with accumulator Step35: Jump on zero to loop4 Step36:You have come to this loop because 60 seconds Step37: You have come to this loop because 60 seconds have elapsed as per real time of day Step38:store updated minutes Step39: You have come to this loop because 1 he has elapsed Step40: Increment hours counter Step41: Decimal adjust accumulator Step42: store updated hours Step43: Compare 24H with accumulator Step44: If midnight has reached then hrs, min and sec display have to be initialized Step45: Move the equivalent of OOH into C re Step46:Load the accumulator with address pointed by min Step47: Load A register with hrs Step48:Call adddisp 34

RESULT: Viva voce: 1. What is machine language? 35

2. What is assembly language? 3. Define mnemonics? 4. What is instruction cycle? 5. What is a fetch and execution cycle? 6. What is a T-state? 7. How does the microprocessor know how and when to start? 8. What is a monitor program? 9. What are the flags effected when HLT instruction is executed? 10. What is meant by vectored and non-vectored interrupts? 11. What happens if a memory location and an I/O or two I/O devices are addressed simultaneously by 12. What is meant by memory address space and I/O address space? 13. Can a ROM be used as stack? Why? 14. devices? 15. What happens halt instruction is executed? 16. How the division operation is performed? 17. Give different memories available? 18. Difference between RAM and ROM? 19. Is there any provision to enter the information into ROM? 20. What are the different types of read only memories? EXPT.NO: 8 HEXADECIMAL CLOCK Aim: Write a program to display a real time hexadecimal clock 36

Apparatus: 1.8085 Microprocessor Kit. 2. Power Supply 3. Real time clock generator module 4. FRC connector Equivalents: String Equivalent String Equivalent String Equivalent hrs 8400 min 8401 sec 8402 datdis 036a ffc2 FFC2 addisp 0363 cwa 2B cwd 9B Port c 2A zero 00 one 01 twofou 24 sixty 60 sixone 61 -- -- Source Code: Mnemonics Label Opcode Operand LX1 MVI OUT LDA MOV CALL SP,ffc2 A,cwd cwa hrs E,A addisp 37

38 LDA min MOV C,A LDA Sec CALL datdis LDA Sec INR A STA sec IN Port c CPI Zero JNZ Loop0 IN Port c CPI One JNZ Loop1 LDA Sec MOV B,A MOV A,B PUSH B CALL Datdis POP B MOV A,B INR A MOV B A STA sixone

CPI JZ JMP MVI STA CALL LDA INR MOV STA MOV LDA MOV PUSH PUSH CALL POP POP MVI STA MOV CPI JZ sixone loop3 Loop0 A, Zero sec datdis Min A C,A min E,A hrs D,A B D adddisp D B A, one sec A,C Sixty loop4 39

40 JMP Loop0 MVI A, zero STA min LDA hrs INR A STA hrs CPI twofou JZ Loop5 MVI C, zero LDA min MOV E,A LDA hrs MOV D,A PUSH D PUSH B CALL addisp POP B POP D JMP loop0 MVI A, zero STA hrs STA min JMP Loop2

Algorithm: step1: Start the program step2: Initialize stack pointer step3: Initialize 8255 step4: Load A-register from hrs step5: Load A-register from hrs step6: call addisp step7: Load A-register with min step8: Load A-register with sec step9: call datdis step10: Load accumulator with Sec step11: Increment seconds by one step12: store the data in 8402 H step13: Receive pulse through port C PCO and check for zero level step14: Jump on zero to loop0 step15: Receive pulse through port C PCO and check for positive edge. Step16: Jump on no zero to loop1 Step17: Seconds loop Step18: Display seconds now Step19: Increment seconds Step20: Decimal adjust accumulator Step21: store minutes Step22: Compare 61H with accumulator 41

Step23: If 60 seconds have elapsed then go to minutes Step24: This loop is executed once 60 seconds have elapsed now the time to Update minutes Step25: store content of accumulator in address painted by sec Step26: call datdis Step27: Minutes loop Step28: Increment minutes loop Step29: Decimal adjust accumulator Step30: Store minutes Step31: load hrs from 8400 H and ready to display Step32: Now is the time to display, hrs and min since hrs and min display uses address display Step33: Move 01H into accumulator Step34: Compare 60H with accumulator Step35: Jump on zero to loop4 Step36: You have come to this loop because 60 seconds Step37: You have come to this loop because 60 seconds have elapsed as per real time of day Step38:store updated minutes Step39: You have come to this loop because 1 he has elapsed Step40: Increment hours counter Step41: Decimal adjust accumulator Step42: store updated hours Step43: Compare 24H with accumulator Step44: If midnight has reached then hrs, min and sec display have to be initialized 42

Step45: Move the equivalent of OOH into C re Step46: Load the accumulator with address pointed by min Step47: Load A register with hrs Step48: Call adddisp Step49: Jump to loop O Step50: Store A-register by hrs Step51: Store A-register content in min Step52: Jump to address pointed by loop2 Result: 43

EXPT NO: 9(A) INTERFACING OF DAC TO 8085 MICROPROCESSOR Aim: To write an ALP to interface the DAC to 8085 processor to generate square wave Apparatus: 1.8085 Microprocessor Kit. 2. D/A converter module 3. FRC connector Equivalents: String Equivalent String Equivalent String Equivalent ffc2 FFC2 mcw 80 cwr 2B Zero 00 Port A 28 count FF High FF -- -- -- -- Source code: Label Mnemonics Operand Start LX1 SP,ffc2 MVI A, mcw 44

OUT cwr Loop1 MVI A, zero OUT CALL MVI OUT CALL JMP port A Delay A, High port A Delay Loop1 Delay MVI C, Count Loop2 DCR C JNZ Loop2 RET Algorithm: Result: 45

EXPT NO: 9(B) INTERFACING OF DAC TO 8085 MICROPROCESSOR Aim: To write an ALP to interface the DAC to 8085 processor to generate triangle wave. Apparatus: 46

1.8085 Microprocessor Kit. 2. D/A converter module 3. FRC connector Equivalents: String Equivalent String Equivalent String Equivalent ffc2 FFC2 mcw 80 cwr 2B Zero 00 Port A 28 ff FF Source code: Label Mnemonics Operand Start LX1 SP,ffc2 MVI OUT A, mcw cwr Loop3 MVI A, zero Loop1 OUT port A INR CPI JNZ A ff Loop1 Loop2 DCR A OUT Port A CPI 00 47

JNZ JMP Loop2 Loop3 Algorithm: Result: Viva voce: 1. What is the difference between CALL and JMP instructions? 2. What is memory? 3. What are the different types of semiconductor memories? 4. What is meant by volatile and non-volatile memory? 5. What is DRAM? 6. What is DMA? 7. Define baud rate? 8. What is RS-232? 9. 10. What is the resolution of an 8-bit DAC for the full-scale output of 10V? 11. What is settling time? 12. Give the specifications of DACs? 13. What is cross assembler? 14. What is PPI? 48

15. Which type of DAC is mostly used? 16. 17. Why DRAMs require refreshing? 18. What are the advantages of static RAMs over DRAMs? 19. What are the advantages of DRAMs over static RAMs? 20. What is the basic memory cell used in static RAMs? EXPT.NO: 10(A). FLASHING DISPLAY Aim: To display the given 8-bit number on 1 st and 2 nd displays. Apparatus: 1.8085 Microprocessor Kit. 2.4digit seven segment display interface module 3. FRC connector Algorithm: Step1: Initialize stack pointer at FFC2h Step2: Load the accumulator with control word for initializing the ports Step3: Move control word from accumulator to control word register 49

Step4: The data to be displayed is loaded into the accumulator Step5: Move the accumulator contents to port C to be displayed on the seven segment displays Step6: Halt the execution of the program Source Code: Mnemonics Opcode LX1 MVI OUT MVI OUT Operand SP,FFC2h A,80h 2B A,08h 2A HLT Result: The given 8-bit number is displayed on 1 st and 2 nd displays EXPT.NO: 10(B) FLASHING DISPLAY Aim: To display the given 8-bit number on 3 rd and 4 th displays. 50

Apparatus: 1.8085 Microprocessor Kit. 2.4digit seven segment display interface module 3. FRC connector. Source Code: Mnemonics Opcode LX1 MVI OUT MVI Operand SP,FFC2h A,80h 2B A,08h OUT 29 HLT Algorithm: Step1: Initialize stack pointer at FFC2h Step2: Load the accumulator with control word for initializing the ports Step3: Move control word from accumulator to control word register Step4: The data to be displayed is loaded into the accumulator Step5: Move the accumulator contents to port B to be displayed on the seven segment displays 51

Step6: Halt the execution of the program Result: The given 8-bit number is displayed on 3 rd and 4 th displays EXPT.NO: 10(C) FLASHING DISPLAY Aim: To display the given 16-bit number on 4 th, 3 rd, 2 nd and 1 st displays. Apparatus: 1.8085 Microprocessor Kit. 2.4digit seven segment display interface module 3. FRC connector Algorithm: Step1: Initialize stack pointer at FFC2h Step2: Load the accumulator with control word for initializing the ports Step3: Move control word from accumulator to control word register Step4: The data to be displayed is loaded into the accumulator Step5: Move the accumulator contents to port B to be displayed on the seven segment displays Step6: Halt the execution of the program Source Code: Mnemonics Opcode Operand 52

LX1 MVI OUT MVI OUT SP,FFC2h A,80h 2B A,08h 2A OUT 29 HLT Result: Viva voce: 1. What are the drawbacks in memory-mapped I/O? 2. What is an interrupt? 3. What is software interrupt? 4. What is the difference between hardware and software interrupts? 5. What is TRAP? 6. How the hardware interrupts of 8085 can be masked or unmasked? 7. What are the temporary registers present in 8085? 8. What is the need of temporary register? 9. What are the pins available in 8085 to transfer data in serial mode? 10. List the externally initiated signals? 53

11. Give the priority order of 8085 interrupts? 12. What is the address location of TRAP? 13. What are the pins used in 8085 to provide DMA controlled operation? 14. Describe XTHL and XCHG? 15. Give the format of LDA instruction? 16. How does the accumulator content will be complimented? 17. To which memory location the program will be transferred when RST 7.5 occurred? 18. How the peripherals be connected to a processor? 19. What is meant by subroutine? 20. How can a user have access to the general- EXPT.NO: 11 KEYBOARD INTERFACING 54

Aim: Write a program to make the keyboard work as a calculator. Apparatus: 1.8085 Microprocessor Kit. 2. Keyboard interface module 3. FRC connector Source code: Label Address Mnemonics Operand B1 B2 B3 Start 8000 LXI SP,FFC2H 31 C2 FF 8003 LXI H,8009H 21 09 80 8006 JMP KBRD(25B0h) C3 B0 25 8009 JMP TBL(2626H) 00 26 26 800C 00 40 26 800F 00 57 26 8012 00 71 26 55

Source code: Label Address Mnemonics Operand B1 B2 B3 KBRD 25B0 MVI A,88 3E 88 25B2 OUT 13 D3 13 RKEY 25B4 MVI A,F0 3E F0 25B6 OUT 12 D3 12 25B8 IN 12 DB 12 25BA ANI F0 E6 F0 25BC CPI F0 FE F0 25BE JZ(25B4) RKEY CA B4 25 56

25C1 MVI B,40 06 40 CNDN 25C3 MVI D,40 16 40 DKEY 25C5 IN 12 DB 12 25C7 ANI F0 E6 F0 25C9 CPI F0 FE F0 25CB JZ(25B4) RKEY CA B4 25 25CE DCR D 15 25CF MOV A,D 7A 25D0 JNZ DKEY C2 C5 25 25D3 DCR B 05 25D4 MOV A,B 78 25D5 JNZ CNDN(25C3 ) C2 C3 25 25D8 MVI B,00 06 00 25DA MVI D,04 16 04 25DC MVI C,7F 0E 7F NXTR 25DE MOV A,C 79 25DF RLC 07 25E0 OUT D3 12 25E2 MOV C,A 4F 25E3 IN 12 DB 12 25E5 ANI F0 E6 F0 25E7 CPI F0 FE F0 25E9 JNZ FNDC C2 F9 25 57

25EC MOV A,B 78 25ED ADI 04 C6 04 25EF MOV B,A 47 25F0 DCR D 15 25F1 CPI 00 FE 00 25F3 JNZ NXTR C2 DE 25 25F6 JMP DONE C3 01 26 FNDC 25F9 RAL 17 17 25FA JNC DONE D2 01 26 25FD INR B 04 25FE JMP FNDC C3 F9 25 DONE 2601 MOV A,B 78 2602 PUSH H E5 2603 LXI H,LKUP(261 6) 21 16 26 2606 MVI D,00 16 00 2608 MOV E,B 58 2609 DAD D 19 260A MOV A,M 7E 260B POP H E1 260C OUT 11 D3 11 260E MOV M,A 77 260F INX H 23 2610 MOV E,M 5E 58

2611 INX H 23 2612 MOV D,M 56 2613 INX H 23 2614 XCHG EB 2615 PCHL E9 LKUP 2616 T 03 02 01 2619 A 00 07 06 261C B 05 04 0B 261F L 0A 09 08 2622 E 0F 0E 0D 2625 0C 2626 XCHG EB 2627 ANA A A7 2628 LDA 8009 3A 09 80 262B CPI 0F FE 0F 262D JZ CLR CA 3C 27 2630 CPI 0A FE 0A 2632 JNC ERR D2 0C 27 2635 MOV E,A 5F 2636 MOV D,OO 16 00 2638 PUSH H E5 2639 CALL 0360 CD 63 03 263C POP H E1 59

263D JMP RKEY C3 B4 25 2640 XCHG EB 2641 PUSH H E5 2642 CALL(276C) CLS CD 6C 27 2645 POP H E1 2646 ANA A A7 2647 LDA 800C 264A CPI OF FE 0F 264C JZ CLR CA 3C 27 264F CPI 0A FE 0A 2651 JC ERR DA 0C 27 2654 JMP C3 90 27 2657 XCHG EB 2658 ANA A A7 2659 LDA 800F 3A 0F 80 265C CPI 0F FE 0F 265E JZ CLR CA 3C 27 2661 CPI 0A FE 0A 2663 JNC ERR D2 0C 27 2666 MOV E,A 5F 2667 PUSH H 16 00 2669 CALL 0363 E5 266A POP H CD 63 03 60

266D JMP RKEY E1 266E XCHG C3 B4 25 2671 PUSH H EB 2672 CALL CLS E5 2673 POP H CD 6C 27 2676 ANA A E1 2677 LDA 800C A7 2678 3A 12 80 267B FE 0F 267D CA 3C 27 2680 FE 0E 2682 C2 0C 27 2685 3A 0C 80 2688 FE 0A 268A CA 9C 26 268D FE 0B 268F CA B0 26 2692 FE 0C 2694 CA C3 26 2697 FE 0D Viva voce: 1. What is tri-state logic? 2. Explain the difference between microprocessor and micro controller? 61

3. What is multiplexing and its advantage? 4. What is the function of ALE? 5. Where is the READY signal used? 6. List the four operations commonly performed by MPU? 7. How many memory locations can be addressed by a 8. Why the program counter and stack pointer are 16-bit registers? 9. How many address lines required to address 2M byte of memory? 10. What is the function of WR signal on memory chip? 11. required to make up 1K bytes of memory? 12. Why are tri-state devices essential in a bus-oriented system? 13. 14. What is flash memory? 15. How many address lines are used to identify an I/O port in the peripheral I/O and in memory mapped I/O? 16. What is the need of multiplexing and de-multiplexing data lines? 17. What is meant by latch? 18. Differentiate latch and buffer? 19. Which flip-flop the octal latch contains? 20. Why active-low logic is popularly used? 62

EXPT.NO: 12(A) ONE S COMPLIMENT OF AN 8-BIT NUMBER Aim: To find the one s compliment of the given 8-bit number and store the result Apparatus: 1.8085 Microprocessor Kit. 2. Power Supply Source Code: Mnemonics Opcode LDA CMA STA HLT Operand 8501h 8502h Algorithm: Step1: Start the program Step2: Load the 8-data into accumulator Step3: Compliment the 8-bit data Step4: Store the result in 8502h 63

Step5: End of the program Result: The one s compliment of the given 8-bit number is found and the result is stored in specified memory location Input Address : I/P Data : Out put Address : O/P Data : EXPT.NO:12(B) TWO S COMPLIMENT OF AN 8-BIT NUMBER Aim: To find the two s compliment of the given 8-bit number and store the result Apparatus: 1.8085 Microprocessor Kit. 2. Power Supply. Source Code: Mnemonics 64

Label Opcode Operand LDA 8501H CMA INR A STA 8502H HLT Algorithm: Step1: Start the program Step2: Load the 8-bit number into accumulator Step3: Complement the accumulator contents Step4: Increment the accumulator contents by one Step5: Store the result in 8502h Step6: End of the program Result: The two s compliment of the given 8-bit number is found and the result Input Address : I/P Data : Out put Address : O/P Data : 65

EXPT.NO: 12(C) MASK OFF MOST SIGNIFICANT4-BITS OF AN 8-BIT NUMBER AIM: To mask off most significant 4-bits of an 8-bit number and store the result APPARATUS: 1.8085 Microprocessor Kit. 2. Power Supply. Source Code: Mnemonics Label Opcode Operand LDA 8501h ANI 0Fh STA 8502h HLT Algorithm: Step1: Start the program Step2: Load the 8-bit data into accumulator Step3: Mask off the most significant 4-bits of 8-bit data Step4: Store the result in 8502h Step5: End of the program 66

Result: The most significant bits of an 8-bit are masked Input Address : I/P Data : Out put Address : O/P Data : Viva voce: EXPT.NO: 13 (A) ADDITION OF TWO 8-BIT NUMBERS Aim: To add two 8-bit numbers and store the result in specified memory locations APPARATUS: 1.8085 Microprocessor Kit. 2. Power Supply 67

SOURCE CODE: Mnemonics Label Mnemonics Operand LX1 H,8501h MV1 C,00h MOV A,M INX H ADD M JNC EIE INR C EIE STA 8503h MOV A,C STA 8504h HLA ALGORITHEM: Step 1: Start the programs Step 2: Load the address of 1 st number in HL pair Step 3: Clear the register C Step 4: Move the 1 st number.in accumulator Step 5: Increment the HL register pair for loading 2 nd number. Step 6: Add the values of 1 st number & 2 nd number. Step 7: If carry continue the process Step 8: If no carry go to the label EIE Step 9: Load LSBS of sum in 85034 Step 10: Load MSBS of sum in 85044 68

Step 11: End of the programs. RESULT: The addition of two 8-bit numbers is performed and the result is stored in the specified memory locations Input Address : I/P Data : Out put Address : O/P Data : EXPT.NO: 3 (B) ADDITION OF TWO 16-BIT BCD NUMBERS Aim: To add two 16-bit numbers and store the result Apparatus: 1.8085 Microprocessor Kit. 2. Power Supply. Source Code: 69

Mnemonics Label Opcode Operand LHLD 8501h XCHG LHLD 8503h MVI C,00h DAD D JNC EIE INR C EIE SHLD 8505h MOV A,C STA 8507h HLT Algorithms: Step1: Start the Program Step2: Load the first 16-bit number in HL pair Step3: Move first number into DE pair Step4: Load the second 6-bit number in HL pair Step5: Clear the register C to store carry Step6: Add two 16-bit numbers. Step7: If no carry go to the label EIE Step8: If carry increment register C by one Step9: Store LSB of sum in 8505h and 8506h Step10: Move MSB of sum in accumulator. Step11: Store MSB of the sum in 8505h Step12: End of the Program. 70

RESULT: The addition of two 16-bit numbers is performed and the result is stored in specified memory locations. Input Address : I/P Data : Out put Address : O/P Data : EXPT.NO: 13(B) LARGEST NUMBER FROM TWO 8-BIT NUMBERS Aim: To find the Largest number from two 8-bit numbers and store the result Apparatus: 1.8085 Microprocessor Kit. 2. Power Supply. Source Code: Mnemonics Label Opcode Operand LXI H,8501h MOV A,M 71

INX H CMP M JNC EIE MOV A,M EIE STA 8503h HLT Algorithm: Step1: Start the program Step2: Initialize HL pair with memory address for getting input data Step3: Get the first number into accumulator Step4: Increment HL register pair to get second number Step5: Compare second number with first number Step6: If no carry, go to label EIE Step7: If there is a carry, Move second number in to accumulator Step8: Store the largest number into specified memory address Step9: End of the Program Result: The largest number from the two 8-bit numbers is found and the result is stored in the specified memory location. Input Address : I/P Data : Out put Address : O/P Data : EXPT.NO: 13(C) ARRANGE A SERIES OF NUMBERS IN ASCENDING ORDER 72

Aim: To arrange a series of numbers in descending order Apparatus: 1.8085 Microprocessor Kit. 2. Power Supply. Source Code: Mnemonics Label Opcode Operand LXI D,8600h LX1 H,8500h MOV B,M CALL Sub rout1 STAX D CRR CALL Sub rout 2 INX D DCR B JNZ CRR HLT Subroutine-1: To find largest number. Mnemonics Label Opcode Operand LX1 H,8500H 73

MOV C,M SUB A EIE-1 INX H CMP M JNC EIE MOV A,M EIE DCR C JNZ EIE-1 RET Subroutine-2 To replace the largest by zero. Mnemonics Label Opcode Operand LX1 H,8500h MOV C,M EIE-3 INX H CMP M JZ EIE-2 DCR C JNZ EIE-3 EIE-2 MVI A,00h MOV M,A RET Algorithm: Step1: Start the program Step2: Initialize the memory locations to store the result. 74

Step3: Get the count value into the HL register pair. Step4: Move count value into register B Step5: Call the subroutine -1 to find the largest number. Step6: Store the largest number in register pair DE Step7: Call subroutine-2 to replace the largest with zero Step8: Increment the register pair DE to store second largest number Step9: Decrement count value bye one Step10: If count non-zero goes to label CRR Step11: End of the Program Subroutine-1: To find the largest number. Step12: Get the count value into HL pair Step13: Move count into register C Step14: Clear the accumulator Step15: Get the first number into register pair HL pair Step16: Compare first number with accumulator contents Step17: If no carry go to label EIE Step18: If there is a carry move memory contents into accumulator Step19: Decrement count value bye one Step20: If non-zero goes to label EIE-1 Step21: Return to the main program. Subroutine-2: To replace the largest number by zero. Step22: Get the count value into HL pair. Step23: Move count into register C Step24: Get first number into register pair HL Step25: Compare first number with accumulator contents Step26: If zero flag is set go to the label EIE-2 Step27: Decrement the count by one Step28: If non- zero jumps to label EIE-3 75

Step29: Clear accumulator Step30: Replace largest number by zero Step31: Return to the main program. RESULT: The series number are arranged in ascending order into the specified memory locations Input Address : I/P Data : Out put Address : O/P Data : EXPT.NO:14 (A) LARGEST NUMBERS IN ADATA ARRAY Aim: To Find the Largest number in a data array Apparatus: 1.8085 Microprocessor Kit. 2. Power Supply. Source Code: Mnemonics Label Opcode Operand LXI M,8500h MOV C,M INX M 76

MOV A,M DCR C EIE INX M CMP M JNC CRR MOV A,M DCR C JNZ EIE STA 8600h HLT Algorithm: Step1: Start the program Step2: Load the address for the count in HL register pair Step3: Move memory to C register, count in register C Step4: Increment the HL register pair Step5: Move the 1 st number into the accumulator Step6: Decrement the C register Step7: Increment the HL register pair Step8: Compare next number with previous maximum Step9: If No carry larger is in accumulator. Go to the label CRR Step10: If carry, get larger number in accumulator Step11: Decrement C register Step12: Store the result in 8600H Step13: End of the Program 77

Result: The largest number in a data array is found and the result is stored in the specified memory location. Input Address : I/P Data : Out put Address : O/P Data : EXPT.NO: 14(B) FIND THE SQURE FROM LOOK-UP TABLE Aim: To Find the Square from the look-up table and store the result Apparatus: 1.8085 Microprocessor Kit. 2. Power Supply. Source Code: Mnemonics Label Opcode Operand LDA 8500h MOV L,A MVI H,86h MOV A,M STA 8501h HLT 78

Algorithm: Step1: Start the program Step2: Load the 8- data into accumulator Step3: Move accumulator contents into the register L Step4: Move 86h data into H register Step5: Move memory contents in to accumulator Step6: Store the square in 8501h Step7: End of the program Look-up table: 8600 00 8601 01 8602 04 8603 09 8604 16 8605 25 8606 36 8607 49 8608 64 8609-81 Result: The Square of the given number is found from look-up table Input Address : I/P Data : Out put Address : O/P Data : 79

EXPT.NO: 5 HEXADECIMAL COUNTERS Viva voce: 1. Give the difference between RAL and RLC? 2. Give the format of RRC? 3. Explain RAR with an example? 4. What is POP PSW? 5. Give the SP content when POP operation is performed? 6. What is the SP content after PUSH initially SP is 2099H? 7. Write a program to clear all the flags? 8. Give the significance of RET instruction? 9. Explain the Restart instructions? 10. Give the difference between conditional and unconditional instructions? 11. What are CM and RM? 12. What is meant by Nesting? 13. When a subroutine is called, where the address of the instruction following the CALL instruction is stored? 14. Give the differences between CALL and PUSH? 15. Give the similarities between CALL and PUSH? 16. Give the differences between RET and RST? 17. Explain BCD subtraction with an example? 18. Differentiate PCHL and SPHL? 19. Explain BCD to seven segments LED code conversion? 80

20. What is meant by a 1-byte instruction? Viva voce: 21. What are the drawbacks in memory-mapped I/O? 22. What is an interrupt? 23. What is software interrupt? 24. What is the difference between hardware and software interrupts? 25. What is TRAP? 26. How the hardware interrupts of 8085 can be masked or unmasked? 27. What are the temporary registers present in 8085? 28. What is the need of temporary register? 29. What are the pins available in 8085 to transfer data in serial mode? 30. List the externally initiated signals? 31. Give the priority order of 8085 interrupts? 32. What is the address location of TRAP? 33. What are the pins used in 8085 to provide DMA controlled operation? 34. Describe XTHL and XCHG? 35. Give the format of LDA instruction? 36. How do the accumulator content will be complemented? 37. To which memory location the program will be transferred when RST 7.5 occurred? 38. How the peripherals be connected to a processor? 39. What is meant by subroutine? 40. How can a user have access to the general-purpose registers of the 81

EXPT NO: 10 INTERRUPT DRIVEN TIMER Viva voce: 1. What is the significance of the interrupt? 2. Explain the NMI pin? 3. What is the significance of TRAP? 4. What is the significance of RIM? 5. What is SIM? 6. Expand SOD? 7. What is the significance of MSE bit in SIM? 8. Indicate the call location for TRAP? 9. Indicate the call location for RST 5.5? 10. How the PIC will be programmed? 11. What are the OCWs and ICWs? 12. What is the significance of pending interrupts? 13. What is the significance of ISR? 82

14. What is meant by interrupt driven clock? 15. What are the software interupts? 16. What is meant by priority resolver? 17. Why 8259 is used? 18. What is the purpose of data bus buffer in 8259? 19. What is the purpose of control logic in 8259? 20. What is the IMR? ADC INTERFACING Viva voce: 1. What is ADC? Why is it needed? 2. What are the specifications of ADC? 3. Different types of ADCs? 4. What is the fastest ADC? 83

5. Which ADC is most widely used and why? 6. How many comparators are required to build an 8-bit parallel comparator ADC? 7. What is meant by the range of input voltage for an ADC? 8. What is meant by conversion time of an ADC? 9. Define the resolution of an ADC? 10. What is the meaning of digital output format of an ADC? 11. What is meant by quantization error? 12. Explain the offset method of reducing quantization error in ADC? 13. What are the specifications required to select an ADC? 14. Differentiate the successive approximation and counting type ADCs? 15. What are different ADC ICs? 16. How an 8-bit ADC is interfaced using interrupts? 17. What is the vector number of TRAP? 18. What are the logical instructions? 19. What are the internal blocks of ADC? 20. What is CMC? 84

EXPT.NO: 13. STEPPER MOTOR INTERFACING Viva voce: 1. What are different types of stepper motors? 2. What are the applications of stepper motor? 3. What are the different modes used in the operation of stepper motor? 4. Which PPI is used to interface stepper motor to µp? 5. Why heat sinks are used in stepper motors? 6. Explain the basic principle of stepper motor? 7. What is the minimum voltage required for stepper motor? 8. Give the angle for 4-step input sequence? 9. Give the angle for 8-step input sequence? 10. What is step rate? 11. What is step angle accuracy in stepper motor? 12. What are the specifications of stepper motor? 13. What is rotor inertia? 14. What is detent torque? 15. What is unipolar stepper motor? 16. What is bipolar stepper motor? 17. Give the differences between half step and full step stepper motors? 18. Define drive sequence? 85

19. What is the application of high speed switching transistor in stepper motor interfacing? 20. What is the need of octal buffer in interfacing? EXPT.NO: 1(D). Aim: Write a program to display a decimal n 2.0. umber 0 on 4 th display, 8 on 3 rd display and 0 on 2 nd sisplay and 8 on 1 st display. Apparatus: 8085 Microprocessor Kit. Power Supply. 86

Source Code: Label Mnemonics Operand Start LX1 SP,FFC2h MVI OUT MVI OUT A,80h 2B A,08h 2A OUT 29 HLT Algorithm: Result: O/P Data : Viva voce: 87

EXPT NO: 15(A) INTERFACING OF DAC TO 8085 MICROPROCESSOR Aim: To write an ALP to interface the DAC to 8085 processor to generate positive ramp Apparatus: 1.8085 Microprocessor Kit. 2. D/A converter module 3. FRC connector Equivalents: String Equivalent String Equivalent String Equivalent ffc2 FFC2 mcw 80 cwr 2B Zero 00 Port A 28 -- -- Algorithm: Step1: Initialize stack pointer at FFC2h Step2: Load the accumulator with control word for initializing all the ports as out put ports Step3: Move control word from accumulator to control word register Step4: Get hexa decimal equivalent of minimum value Step5: Move out put contents of accumulator to port A Step6: Increment content of accumulator Step7: Jump to address pointed by loop 88

Source code: Label Mnemonics Operand Start LX1 SP,ffc2h MVI OUT MVI A, mcw cwr A, zero loop OUT port A INR JMP A loop Result: EXPT NO: 15(B) INTERFACING OF DAC TO 8085 MICROPROCESSOR Aim: To write an ALP to interface the DAC to 8085 processor to generate negative ramp Apparatus: 89

1.8085 Microprocessor Kit. 2. D/A converter module 3. FRC connector Equivalents: String Equivalent String Equivalent String Equivalent ffc2 FFC2 mcw 80 cwr 2B Max FF Port A 28 -- -- Algorithm: Step1: Initialize stack pointer at FFC2h Step2: Load the accumulator with control word for initializing all the ports as out put ports Step3: Move control word from accumulator to control word register Step4: Get hexa decimal equivalent of maximum value Step5: Move out put contents of accumulator to port A Step6: Increment content of accumulator Step7: Jump to address pointed by loop Source code: Label Mnemonics Operand Start LX1 SP,FFC2h MVI A, mcw 90

OUT MVI cwr A, max loop OUT port A DCR JMP A loop Result: EXPT NO: 15(C) INTERFACING OF DAC TO 8085 MICROPROCESSOR Aim: To write an ALP to interface the DAC to 8085 processor to generate positive stair case Apparatus: 91

1.8085 Microprocessor Kit. 2. D/A converter module 3. FRC connector Equivalents: String Equivalent String Equivalent String Equivalent ffc2 FFC2 mcw 80 cwr 2B Max FF Port A 28 Zero 00 first 34 second 67 third 99 fourth CD final CD count FF Algorithm: Step1: Initialize stack pointer at FFC2h Step2: Load the accumulator with control word for initializing all the ports as out put ports Step3: Move control word from accumulator to control word register Step4: Get hexa decimal equivalent of ground level Step5: Move out put contents of accumulator to port A Step6: Call Delay sub-routine Step7: Get hexa decimal equivalent of first step 92

Step8: Move out put contents of accumulator to port A Step9: Call Delay sub-routine Step10: Get hexa decimal equivalent of second step Step11: Move out put contents of accumulator to port A Step12: Call Delay sub-routine Step13: Get hexa decimal equivalent of third step Step14: Move out put contents of accumulator to port A Step15: Call Delay sub-routine Step16: Get hexa decimal equivalent of final step Step17: Move out put contents of accumulator to port A Step18: Call Delay sub-routine Step19: Jump to address pointed by Loop1 Step20: Delay sub-routine Step21: Decrement content of C-register Step22: Jump on no zero, to address pointed by Loop2 Step23: Return to main program Source code: Label Mnemonics Operand Start LX1 SP,FFC2h 93