Microprocessors And Microcontrollers Lab Dept Of ECE

2y ago
14 Views
2 Downloads
1.83 MB
105 Pages
Last View : 23d ago
Last Download : 2m ago
Upload by : Jacoby Zeller
Transcription

Microprocessors and Microcontrollers labDept of ECEGeethanjali College of Engineering and TechnologyCheeryal (v), Keesara (M), Ranga Reddy District.Microprocessor and MicrocontrollersLaboratory Student ManualForIII ECE- II SEMDEPARTMENT OFELECTRONICS & COMMUNICATOIN ENGINEERING2015-2016INCHARGE(M.Laxmi)HOD(Dr. P. Srihari)1 PageGeethanjali College Of Engineering And Technology, Cheeryal

Microprocessors and Microcontrollers labDept of ECEGEETHANJALI COLLEGE OF ENGINEERING AND TECHNOLOGYDEPARTMENT OF Electronics and Communication Engineering(Name of the Subject ) : Microprocessors and MicrocontrollersCourse file(JNTU CODE – A60494 )Programme : UGBranch : ECEYear: IIISemester : IIVersion No : 2Document: GCETNo. of pages :120Classification status (Unrestricted / Restricted ) : UnrestrictedDistribution List : Dept. Library, Dept Office, Concerned FacultyPrepared by:1) Name : M. Laxmi2) Sign :3) Desg : Assoc. Professor.4) Date : 01-07--2014Verified by :1) Name2) Sign3) Desg4) DateUpdated by:1) Name : P.SNEHA NAGA SHILPA2) Sign :3) Desg : Asst. Professor .4) Date : 23-11-2015* For Q.C Only.::::1) Name2) Sign3) Desg4) Date::::Approved by : (HOD )1) Name : Dr.P.Srihari2) Sign :3) Date :GCET2 Page

Microprocessors and Microcontrollers labDept of ECEJAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITYHYDERABADIII year B.Tech. ECE- II SEML T/P/D C0 -/3/2(A60494)MICROPROCESSORS AND MICROCONTROLLERS LABList of ExperimentsThe following programs/experiments are written for assembler and execute thesame with8086 and 8051 kits1. Programs for 16 bit arithmetic operations for 8086 (using various addressingmodes)2. Program for sorting an array for 80863. Program for searching for a number or character in a string for 80864. Program for String manipulations for 80865. Program for digital clock design using 8086.6. Interfacing ADC and DAC to 8086.7. Parallel communication between two microprocessors using 8255.8. Serial communication between two microprocessor kits using 8251.9. Interfacing to 8086 and programming to control stepper motor.10. Programming using arithmetic, logical and bit manipulation instructions of 805111. Program and verify Timer/Counter in 8051.12. Program and verify interrupt handling in 8051.13. UART operation in 8051.14. Communication between 8051 kit and PC.15. Interfacing LCD to 8051.16. Interfacing matrix or keyboard to 8051.17. Data transfer from peripheral to memory through DMA controller 8237/8257Note: Minimum of 12 experiments to be conducted.GCET3 Page

Microprocessors and Microcontrollers labDept of ECEThe Mission of the instituteOur mission is to become a high quality premier educational institution, tocreate technocrats, by ensuring excellence, through enriched knowledge,creativity and self development.The Vision of the instituteGeethanjali visualizes dissemination of knowledge and skills to students, whowould eventually contribute to the well being of the people of the nation andglobal community.Vision of the DepartmentTo impart quality technical education in Electronics and Communication Engineeringemphasizing analysis, design/synthesis and evaluation of hardware/embeddedsoftware using various Electronic Design Automation (EDA) tools with accent oncreativity, innovation and research thereby producing competent engineers who canmeet global challenges with societal commitment.Mission of the Departmenti.To impart quality education in fundamentals of basic sciences, mathematics,electronics and communication engineering through innovative teaching-learningprocesses.ii. To facilitate Graduates define, design, and solve engineering problems in thefield of Electronics and Communication Engineering using various ElectronicDesign Automation (EDA) tools.iii. To encourage research culture among faculty and students thereby facilitatingthem to be creative and innovative through constant interaction with R & Dorganizations and Industry.iv. To inculcate teamwork, imbibe leadership qualities, professional ethics and socialresponsibilities in students and faculty.GCET4 Page

Microprocessors and Microcontrollers labDept of ECEProgram Educational Objectives of B. Tech (ECE) Program :I.To prepare students with excellent comprehension of basic sciences,mathematics and engineering subjects facilitating them to gain employment orpursue postgraduate studies with an appreciation for lifelong learning.II.To train students with problem solving capabilities such as analysis anddesign with adequate practical skills wherein they demonstrate creativity andinnovation that would enable them to develop state of the art equipment andtechnologies of multidisciplinary nature for societal development.III.To inculcate positive attitude, professional ethics, effective communicationand interpersonal skills which would facilitate them to succeed in the chosenprofession exhibiting creativity and innovation through research anddevelopment both as team member and as well as leader.Program Outcomes of B.Tech ECE Program:1. An ability to apply knowledge of Mathematics, Science, and Engineering tosolve complex engineering problems of Electronics and CommunicationEngineering systems.2. An ability to model, simulate and design Electronics and CommunicationEngineering systems, conduct experiments, as well as analyze and interpretdata and prepare a report with conclusions.3. An ability to design an Electronics and Communication Engineering system,component, or process to meet desired needs within the realistic constraintssuch as economic, environmental, social, political, ethical, health and safety,manufacturability and sustainability.4. An ability to function on multidisciplinary teams involving interpersonal skills.5. An ability to identify, formulate and solve engineering problems ofmultidisciplinary nature.6. An understanding of professional and ethical responsibilities involved in thepractice of Electronics and Communication Engineering profession.7. An ability to communicate effectively with a range of audience on complexengineering problems of multidisciplinary nature both in oral and written form.GCET5 Page

Microprocessors and Microcontrollers labDept of ECE8. The broad education necessary to understand the impact of engineeringsolutions in a global, economic, environmental and societal context.9. A recognition of the need for, and an ability to engage in life-long learning andacquire the capability for the same.10. A knowledge of contemporary issues involved in the practice of Electronicsand Communication Engineering profession11. An ability to use the techniques, skills and modern engineering toolsnecessary for engineering practice.12. An ability to use modern Electronic Design Automation (EDA) tools, softwareand electronic equipment to analyze, synthesize and evaluate Electronics andCommunication Engineering systems for multidisciplinary tasks.13. Apply engineering and project management principles to one's own work andalso to manage projects of multidisciplinary nature.Course Overview:Microelectronics is increasingly pervading all aspects of industry, education andthe home. A leading example of microelectronic techniques is the microprocessor,and as its use increases the need for knowledge and understanding will alsogrow. The microprocessor lab was designed to give an overview over theprogramming of such a microprocessor system. The students will write and debugassembly language programs using the Microsoft Macro Assembler(TASM)/Turbo Assembler(TASM). This Lab provides students with the opportunityto gain experience in microprocessor-based system design, assembly languageprogramming, and I/O interfacing to microprocessors.Course Outcomes:After completing this course, the student will be able to:1. Apply the fundamentals of assembly level programming of microprocessors.2. Build a program on a microprocessor using instruction set of 8086.GCET6 Page

Microprocessors and Microcontrollers labDept of ECE3. Summarize the concepts of Assembly level language programming and itsapplications.4. Develop the assembly level programming using 8086 instruction set.5. Analyze abstract problems and apply a combination of hardware and softwareto address the problem6. Contrast how different I/O devices can be interfaced to processor and willexplore several techniques of interfacing.7. Experiment with standard microprocessor interfaces including GPIO, serialports, digital-to-analog converters and analog-to-digital converters;8. Make use of standard test and measurement equipment to evaluate digitalinterfaces.INSTRUCTIONS TO THE STUDENTS:1. Students are required to attend all labs.2. Students will work in a group of two in hardware laboratories andindividually in computer laboratories.3. While coming to the lab bring the lab manual cum observation book,record etc.4. Take only the lab manual, calculator (if needed) and a pen or pencil tothe work area.5. Before coming to the lab, prepare the prelab questions. Read throughthe lab experiment to familiarize yourself with the components andassembly sequence.6. Utilize 3 hours time properly to perform the experiment and notingdown the readings. Do the calculations, draw the graph and takesignature from the instructor.7. If the experiment is not completed in the prescribed time, the pendingwork has to be done in the leisure hour or extended hours.8. You will be expected to submit the completed record book according tothe deadlines set up by your instructor.GCET7 Page

Microprocessors and Microcontrollers labDept of ECE9. For practical subjects there shall be a continuous evaluation during thesemester for 25 sessional marks and 50 end examination marks.10. Of the 25 marks for internal, 15 marks shall be awarded for day-to-daywork and 10 marks to be awarded by conducting an internal laboratorytest.INSTRUCTIONS TO LABORATORY TEACHERS:1. Observation book and lab records submitted for the lab work are to bechecked and signed before the next lab session.2. Students should be instructed to switch ON the power supply after theconnections are checked by the lab assistant / teacher.3. The promptness of submission should be strictly insisted by awarding themarks accordingly.4. Ask viva questions at the end of the experiment.5. Do not allow students who come late to the lab class.6. Encourage the students to do the experiments innovatively.GCET8 Page

Microprocessors and Microcontrollers labDept of ECEMICROPROCESSORS AND MICROCONTROLLERS LABLIST OF EXPERIMENTSCYCLE-I (MICROPROCESSOR PROGRAMS)1. Study of TASM/MASM2. 16-bit arithmetic Operations3. Sorting an Array4. Searching for Character in a String5. Sting Manipulations6. Digital Clock Design7. Interfacing DAC8. Interfacing ADCCYCLE-II (MICROCONTROLLER PROGRAMS)9. Arithmetic, Logical and Bit Manipulation operations10. Timer/Counters operations11. Interrupt Handling12. UART Operation13. LCD Interfacing14. Interfacing Matrix keyboardCYCLE-III (ADDITIONAL EXPERIMENTS USING KEIL)15. Serial Transmission from PC to 8051uc16. Port Programming of 8051CYCLE-IV (DESIGN & OPEN EXPERIMENTS)GCET9 Page

Microprocessors and Microcontrollers labDept of ECEMICROPROCESSORS AND MICROCONTROLLERS LABINDEXSl.No.NAME OF THE EXPERIMENTPAGENo.CYCLE -I0Study of TASM/MASM141Introduction to 8086 microprocessor19216-bit arithmetic Operations253Sorting an Array344Searching for Character in a String405Sting Manipulations436Digital Clock Design517Interfacing DAC538Interfacing ADC589Serial communication between two 8086microprocessors6110GCETPageInterfacing stepper motor6510

Microprocessors and Microcontrollers lab11Interfacing to 8086 and Programming to DMA controllerDept of ECE68CYCLE-II12Introduction to 80517013Arithmetic, Logical and Bit Manipulation operations7914Timers and Counters8815Interrupt Handling91CYCLE-3 (ADDITIONAL EXPERIMENTS USING KEIL)16Introduction to KEIL µ vision931718Serial Transmission from PC to 8051ucReading & writing data from/to 8051 ports99100CYCLE-4 (DESIGN & OPEN EXPERIMENTS)GCETPage11

Microprocessors and Microcontrollers labDept of ECEINTRODUCTION TO TASMEDITOR:An editor is a program, which allows you to create a file containing theassembly language statements for your program. As you type in your program, theeditor stores the ASCII codes for the letters and numbers in successive RAMlocations. When you have typed in all of your programs, you then save the file on afloppy of hard disk. This file is called source file. The next step is to process thesource file with an assembler. In the TASM assembler, you should give your sourcefile name the extension, .ASMASSEMBLER:An assembler program is used to translate the assembly language mnemonicsfor instructions to the corresponding binary codes. When you run the assembler, itreads the source file of your program the disk, where you saved it after editing on thefirst pass through the source program the assembler determines the displacement ofnamed data items, the offset of labels and pails this information in a symbol table. Onthe second pass through the source program, the assembler produces the binarycode for each instruction and inserts the offset etc tha t is calculated during the firstpass. The assembler generates two files on floppy or hard disk. The first file calledthe object file is given the extension. OBJ. The object file contains the binary codesfor the instructions and information about the addresses of the instructions. Thesecond file generated by the assembler is called assembler list file. The list filecontains your assembly language statements, the binary codes for each instructionsand the offset for each instruction. In TASM assembler, TASM source file name ASMis used to assemble the file. Edit source file name LST is used to view the list file,which is generated, when you assemble the file.LINKER:A linker is a program used to join several object files into one large object fileGCETPage12

Microprocessors and Microcontrollers labDept of ECEand convert to an exe file. The linker produces a link file, which contains the binarycodes for all the combined modules. The linker however doesn’t assign absoluteaddresses to the program, it assigns is said to be relocatable because it can be putanywhere in memory to be run. In TASM, TLINK source filename is used to link thefile.DEBUGGER:A debugger is a program which allows you to load your object code programinto system memory, execute the program and troubleshoot are debug it thedebugger allows you to look at the contents of registers and memory locations afteryour program runs. It allows you to change the contents of register and memorylocations and return the program. A debugger also allows you to set a break point atany point in the program. If you inset a breakpoint the debugger will run the programupto the instruction where the breakpoint is set and stop execution. You can thenexamine register and memory contents to see whether the results are correct at thatpoint. In TASM, td filename is issued to debug the file.DEBUGGER FUNCTIONS:1. Debugger allows us to look at the contents of registers and memory locations.2. We can extend 8-bit register to 16-bit register which the help of extended registeroption.3. Debugger allows us to set breakpoints at any point with the program.4. The debugger will run the program upto the instruction where the breakpoint is setand then stop execution of program. At this point, we can examine registry andmemory contents at that point.5. With the help of dump we can view register contents.6. We can trace the program step by step with the help of F7.7. We can execute the program completely at a time using F8.DEBUGGER COMMANDS:GCETPage13

Microprocessors and Microcontrollers labDept of ECEASSEMBLE:To write assembly language program from the given addressA starting address cr Eg: a 100 cr Starts program at an offset of 100.DUMP:To see the specified memory contentsD memory location first address last address(While displays the set of values stored in the specified range, which is given above)Eg: d 0100 0105 cr Display the contents of memory locations from 100 to 105(including).ENTER:To enter data into the specified memory locations(s).E memory location data dataEg: e 1200datadatadata cr 10 20 30 40 .Enters the above values starting from memory locations 1200 to 1203, by loading 10into 1200,20 into 1201 and soon.GO:To execute the programG: one instruction executes (address specified by IP)G address cr : executes from current IP to the address specifiedG first address last addresses cr : executes a set of instructions specified betweenthe given addressesMOVE:Moves a set of data from source location to destination locationM first address last address destination addressEg: m100 104 200Transfers block of data (from 100 to 104) to destination address 200.GCETPage14

Microprocessors and Microcontrollers labDept of ECEQUIT:To exit from the debugger.Q cr REGISTER:Shows the contents of RegistersR register nameEg: r axShows the contents of register.TRACE:To trace the program instruction by instruction.T 0100 cr : traces only the current instruction. (Instruction specified by IP)T 0100 02 cr : Traces instructions from 100 to 101, here the second argumentspecifies the number of instructions to be traced.UNASSEMBLE:To unassembled the program.Shows the opcodes along with the assembly language program.GCETPage15

Microprocessors and Microcontrollers labDept of ECEINTRODUCTION TO 8086 MICROPROCESSOR80868086 ARCHITECTURE:GCETPage16

Microprocessors and Microcontrollers labDept of ECEPIN DIAGRAM:8086 INSTRUCTION SET SUMMARY:The following is a brief summary of the 8086 instruction set:Data Transfer InstructionsMOV:Move byte or word to register or memoryIN, OUT:Input byte or word from port, output word to portLEA:Load effective addressLDS, LES:Load pointer using data segment, extra segmentPUSH, POP:Push word onto stack, pop word off stackXCHG:Exchange byte or wordXLAT:Translate byte using look-up tableLogical InstructionsGCETPage17

Microprocessors and Microcontrollers labNOTANDORXORTEST:::::Dept of ECELogical NOT of byte or word (one's complement)Logical AND of byte or wordLogical OR of byte or wordLogical exclusive-OR of byte or wordTest byte or word (AND without storing)Shift and Rotate InstructionsSHL, SHR:Logical shift left, right byte or word by 1 or CLSAL, SAR:Arithmetic shift left, right byte or word by 1 or CLROL, ROR:Rotate left, right byte or word by 1 or CLRCL, RCR:Rotate left, right through carry byte or word by 1 or CLArithmetic InstructionsADD, SUB:ADC, SBB:INC, DEC:NEG:CMP:MUL, DIV:IMUL, IDIV:CBW, CWD:AAA, AAS, AAM, AAD:DAA, DAS:Transfer InstructionsJMP:JA (JNBE):JAE (JNB):JB (JNAE):JBE (JNA):JE (JZ):JG (JNLE):JGE (JNL):JL (JNGE):JLE (JNG):JC, JNC:JO, JNO:GCETPageAdd, subtract byte or wordAdd, subtract byte or word and carry (borrow)Increment, decrement byte or wordNegate byte or word (two's complement)Compare byte or word (subtract without storing)Multiply, divide byte or word (unsigned)Integer multiply or divide byte or word (signed)Convert byte to word, word to double word (useful beforemultiply/divide)ASCII adjust for addition, subtraction, multiplication,division (ASCII codes 30-39)Decimal adjust for addition, subtraction (binary codeddecimal numbers)Unconditional jumpJump if above (not below or equal)Jump if above or equal (not below)Jump if below (not above or equal)Jump if below or equal (not above)Jump if equal (zero)Jump if greater (not less or equal)Jump if greater or equal (not less)Jump if less (not greater nor equal)Jump if less or equal (not greater)Jump if carry set, carry not setJump if overflow, no overflow18

Microprocessors and Microcontrollers labJS, JNSJNP (JPO)JP (JPE)LOOPLOOPE (LOOPZ)LOOPNE (LOOPNZ)JCXZ:::::::Dept of ECEJump if sign, no signJump if no parity (parity odd)Jump if parity (parity even)Loop unconditional, count in CXLoop if equal (zero), count in CXLoop if not equal (not zero), count in CXJump if CX equals zeroSubroutine and Interrupt InstructionsCALL, RET:Call, return from procedureINT, INTO:Software interrupt, interrupt if overflowIRET:Return from interruptString InstructionsMOVSMOVSB, MOVSWCMPSSCASLODS, STOSREPREPE, REPZREPNE, REPNZ::::::::Move byte or word stringMove byte, word stringCompare byte or word stringScan byte or word stringLoad, store byte or word stringRepeatRepeat while equal, zeroRepeat while not equal (zero)Processor Control InstructionsSTC, CLC, CMC:Set, clear, complement carry flagSTD, CLD:Set, clear direction flagSTI, CLI:Set, clear interrupt enable flagLAHF, SAHF:Load AH from flags, store AH into flagsPUSHF, POPF:Push flags onto stack, pop flags off stackESC:Escape to external processor interfaceLOCK:Lock bus during next instructionNOP:No operation (do nothing)WAIT:Wait for signal on TEST inputHLT:Halt processorGCETPage19

Microprocessors and Microcontrollers labDept of ECECYCLE-IGCETPage20

Microprocessors and Microcontrollers labDept of ECEEXPERIMENT NO.1ARITHMETIC OPERATIONS IN 8086I.ADDITION OF TWO 16-BIT NUMBERSOBJECTIVE:To write an assembly language program for performing addition of two 16-bit signed andunsigned numbers.TOOLS REQUIRED: PC installed with TASMALGORITHM:Step I:Initialize the data memory.Step II:Load the first number into AX register.Step II:Load the second number into BX register.Step IV:Add two lower digits.Step V:Adjust result to valid BCD number.Step VI:Store the result in BL.Step VI:Add the two upper digits with carry.Step VIII:Adjust result to valid BCD number.Step IX:Store the result in BH.Step X:Display the result.Step XI:Stop.GCETPage21

Microprocessors and Microcontrollers labDept of ECEFLOW CHART:STARTINITIALIZATION OF DATASEGMENTAX OPR1AX AX OPR2RES AXSTOPRESULT:FLAGS:Before execution, c 0, s 0, z 0, o 0, p 0, a 0, i 1, d 0.After execution, c 0, s 0, z 0, o 0, p 1, a 0, i 1, d 0.INPUT:OUTPUT:OPR1 4269HOPR2 1000HRES 5269HSIGNED NUMBERSFLAGS:Before execution, c 0, s 0, z 0, o 0, p 0, a 0, i 1, d 0.After execution, c 1, s 0, z 0, o 1, p 0, a 0, i 1, d 0.INPUT:OPR1 9763HOPR2 A973HOUTPUT:RES 40D6HGCETPage22

Microprocessors and Microcontrollers labDept of ECEOUTCOMEUpon completion of this experiment, the student will be able to:1. Employ the arithmetic instructions in various programs.2. Solve some mathematical operations by using the 8086 microprocessorGCETPage23

Microprocessors and Microcontrollers labDept of ECEII.SUBTRACTION OF TWO 16-BIT NUMBERSOBJECTIVETo write an assembly language program to perform subtraction of two 16-bit signed andunsigned numbers.TOOLS REQUIRED: : PC installed with TASMALGORITHM:Step I:Initialize the data memory.Step II:Load the first number into AX register.Step III:Load the second number into BX register.Step IV:Sub AX from BX.Step V:Store result in AXStep VI:Display the result.Step VII:Stop.FLOW CHART:STARTINITIALIZATION OF DATASEGMENTAX OPR1AX AX-OPR2RES AXSTOPRESULTFLAGS:Before execution, c 0, s 0, z 0, o 0, p 0, a 0, i 1, d 0.After execution, c 0, s 0, z 0, o 0, p 1, a 0, i 1, d 0.INPUTGCETPage:OPR1 4269H24

Microprocessors and Microcontrollers labOUTPU::Dept of ECEOPR2 1000HRES 3269HSIGNED NUMBERSFLAGS:Before execution, c 0, s 0, z 0, o 0, p 0, a 0, i 1, d 0.After execution, c 0, s 0, z 0, o 0, p 1, a 0, i 1, d 0.INPUT:OUTPUT:OPR1 9763HOPR2 8973HRES 0DF0HOUTCOME:Upon completion of this experiment, the student will be able to:1. Employ the arithmetic instructions in various programs.2. Solve some mathematical operations by using the 8086 microprocessorGCETPage25

Microprocessors and Microcontrollers labDept of ECEIII.MULTIPLICATION OF TWO 16-BIT NUMBERSOBJECTIVE:To write an assembly language program to perform multiplication of two 16-bit unsignednumbers.TOOLS REQUIRED: : PC installed with TASMALGORITHM:Step I:Initialize the data memory.Step II:Load the first number into AX register.Step III:Load the second number into BX register.Step IV:Multiply AX with BX.Step V:store lower byte in accumulator.Step VI:Store Upper byte in DX registerStep VII:Display the result.Step VIII:Stop.FLOW CHART:STARTINITIALIZATION OFDATA SEGMENTAX OPR1AX AX*OPR2RESLW AXRESHW DXSTOPGCETPage26

Microprocessors and Microcontrollers labDept of ECERESULT:FLAGS:Before execution, c 0, s 0, z 0, o 0, p 0, a 0, i 1, d 0.After execution, c 1, s 0, z 0, o 1, p 0, a 0, i 1, d 0.INPUT:OPR1 2000HOPR2 4000HOUTPUT:RESLW 0000H (AX)RESHW 0800H (DX)OUTCOME:Upon completion of this experiment, the student will be able to:1.Employ the arithmetic instructions in various programs.2.Solve some mathematical operations by using the 8086 microprocessorGCETPage27

Microprocessors and Microcontrollers labDept of ECEIV.DIVISION OF TWO NUMBERSOBJECTIVE:To write an assembly language program to perform division of 16-bit unsignednumber by 8-bit unsigned number.TOOLS REQUIRED: : PC installed with TASMALGORITHM:Step I:Initialize the data memory.Step II:Load the first number into AX register.Step III:Load the second number into BX register.Step IV:Divide AX by BX.Step V:store Quotient in AL register.Step VI:Store reminder in AH registerStep VII:Display the result.Step VIII:Stop.FLOW CHART:STARTINITIALIZATION OF DATASEGMENTDIVISION OF AX BY OPR2AX AX/OPR2RESQ ALRESR AHGCETPageSTOP28

Microprocessors and Microcontrollers labDept of ECERESULT:FLAGS:Before execution, c 0, s 0, z 0, o 0, p 0, a 0, i 1, d 0.After execution, c 0, s 0, z 0, o 0, p 0, a 1, i 1, d 0.INPUT:OPR1 2C58H (DIVIDEND)OPR2 56H (DIVISOR)OUTPUT:RESQ 84H (AL)RESR 00H (AH)VIVA QUESTIONS:1) How many bit 8086 microprocessor is?2) What is the size of data bus of 8086?3) What is the size of address bus of 8086?4) What is the max memory addressing capacity of 8086?5) Which are the basic parts of 8086?OUTCOMEUpon completion of this experiment, the student will be able to:1. Employ the arithmetic instructions in various programs.2. Solve some mathematical operations by using the 8086 microprocessorGCETPage29

Microprocessors and Microcontrollers labDept of ECEEXPERIMENT NO.2PROGRAM FOR SORTING AN ARRAY FOR 8086 MICROPROCESSORI.ASCENDING ORDEROBJECTIVE:To write an assembly language program to arrange the given numbers in ascendingorder.TOOLS REQUIRED: : PC installed with TASMALGORITHM:Step I:Initialize the number of elements counter.Step II:Initialize the number of comparisons counter.Step III:Compare the elements. If first element second element gotostepVIII Else go to step V.Step IV:Swap the elements.Step V:Step VI:Is count 0 ? if yes go to step VIII else go to step IV.Step VII:Insert the number in proper position.Decrement the comparison counter.Step VIII:Increment the number of elements counter.Step IX:Is count N ? If yes, go to step XI else go to step IIStep XStep XIGCETPage:Store the result.:Stop.30

Microprocessors and Microcontrollers labDept of ECEFLOW CHART:STARTINITIALIZATION OFDATA SEGMENTDX COUNT-1BACK : CX DXSI OFFSETADDRESS OF LISTAGAIN: AX [SI]IFAX [SI 2]TRUEFALSEEXCHANGE[SI] &[SI 2]INCREMENT SI BY 2FALSEIFCX 0TRUEDECREMENT DXFALSEIFDX 0TRUESTOPGCETPage31

Microprocessors and Microcontrollers labDept of ECERESULT:INPUT:LIST (DS: 0000H) 05H,04H,01H,03H,02HOUTPUT: LIST (DS: 0000H) 01H,02H,03H,04H,05HOUTCOME:Upon completion of this experiment the student will be able to:1. Demonstrate the control transfer instructions.2. Explain number searches and differentiates bigger and smaller numbers fromlarge database.GCETPage32

Microprocessors and Microcontrollers labDept of ECEII. DESCENDING ORDEROBJECTIVE:To write an assembly language program to arrange the given numbers indescending order.TOOLS REQUIRED: : PC installed with TASMALGORITHM:Step I: Initialize the number of elements counter.Step II: Initialize the number of comparisons counter.Step III: Compare the elements. If first element second element goto step VIIIElse goto step V.Step IV: Swap the elements.Step V: Decrement the comparison counter.Step VI: .Is count 0 ? if yes goto step VIII else goto step IV.Step VII: Insert the number in proper position.Step VIII : Increment the number of elements counter.Step IX: Is count N ? If yes, goto step XI else goto step IIStep X: Store the result.Step XI: Stop.GCETPage33

Microprocessors and Microcontrollers labDept of ECEFLOW CHART:STARTINITIALIZATION OFDATA SEGMENTDX COUNT-1BACK : CX DXSI OFFSETADDRESS OF LISTAGAIN: AX [SI]IFAX [SI 2]TRUEFALSEEXCHANGE[SI] &[SI 2]INCREMENT SI BY 2FALSEIFCX 0TRUEDECREMENT DXFALSEIFDX 0TRUEGCETPage34 STOP

Microprocessors and Microcontrollers labDept of ECERESULT:INPUT:LIST (DS: 0000H) 03H, 04H,01H,05H,02HOUTPUT: LIST (DS: 0000H) 05H, 04H, 03H,02H,01HVIVA QUESTIONS:1) What are the functions of BIU?2) What are the functions of EU?3) How many pin IC 8086 is?4) What IC8086 is?5) What is the size of instruction queue in 8086?OUTCOME:Upon completion of this experiment the student will be able to:1. Demonstrate the control transfer instructions.2. Explain number searches and differentiates bigger and smaller numbers fromlarge database.GCETPage35

Microprocessors and Microcontrollers labDept of ECEEXPERIMENT NO.3PROGRAM FOR SEARCHING FOR A NUMBER/CHARACTER IN A STRING FOR8086 MICROPROCESSORSEARCHING FOR A NUMBEROBJECTIVE:To find whether the given byte is in given string or not & find its relative addressTOOLS REQUIRED: : PC installed with TASMALGORITHM:Step I: Initialize the extra segment .(ES)Step II.: Initialize the start of string in the ES. (DI)Step III: Move the number of elements in the string in CX registerStep IV: Move the byte to be searched in the AL register.Step V: Scan for the byte in ES. If the byte is found ZF 0,move the addresspointed by S:DI to BX.Step VI: Store the resultStep VII: Stop.GCETPage36

Microprocessors and Microcontrollers labDept of ECEFLOWCHART:STARTINITIALIZATION OF DATASEGMENTAL BYTE CL COUNT,BX 00,SI, OFFSET LISTYesIF AL [SI]Increment BXIncrement SI,Decrement CLnoIfyesCL 0NOPSTOPRESULT:GIVEN DATA:N 19H,99H,45H,46H,34HBYTE

3. While coming to the lab bring the lab manual cum observation book, record etc. 4. Take only the lab manual, calculator (if needed) and a pen or pencil to the work area. 5. Before coming to the lab, prepare the prelab questions. Read through the lab experiment to familiari

Related Documents:

Introduction to Microprocessors and Microcontrollers can be (usually is) made from one or more microprocessors. The IBM design for the ‘Blue Gene’ supercomputer includes a million processors! Remember: MPU is the thing CPU is the job. Micro The word micro is used in electronics and in science generally, to mean ‘one-millionth’ or 1 –610 .

MICROPROCESSORS AND MICROCONTROLLERS 15CS44 1. There is a carry from D6 to D7, but no carry out of D7 (CF 0) 2. There is a carry from D7 out (CF 1), but no carry from D6 to D7.

Interrupt system is an important feature, as microcontrollers have to respond to control oriented devices in real time. E.g., opening of microwave oven's door cause an interrupt to stop the operation. Microprocessors are most commonly used as the CPU in microcomputer systems. Microcontrollers are used in small, minimum component designs

Apr 11, 2007 · State Dept. of Education Dept of Children and Families Judicial Department Higher Education Community and Technical colleges Public Health Dept of Mental Health and Addiction Services Dept of Mental Retardation Dept t of Labor Dept of Transportation Dept of Corrections We do not have a

1.1Why Microcontrollers? To those who are unfamiliar with these devices, microcontrollers might seem extremely simple and rare as compared to personal computers. However, microcontrollers and microprocessors are embedded in many devices, with hund

pher on 8-bit AVR microcontrollers, 32-bit RISC-V processors, and 64-bit ARM processors. The optimal performance is achieved through e cient register allo-cation and instruction techniques. 3.1 8-bit Low-end AVR Microcontrollers Instruction set. AVR microcontrollers have useful instruction sets. Generally instructions take 1 or 2 clock cycles.

INTRODUCTION TO MICROPROCESSORS COURSE OUTLINE Topic Class notes Ford & Topp, 2nd Ed. Informational (1 lecture) a. Course syllabus b. grading policies c. CWRUnet ethics code d class notes e. CWRUnet 1. connecting via PPP 2. connecting to the Kern Lab f. Where microprocessors came from 1-4 5 6-8 9 10 11 Number systems and computer math (3 lectures)

n Julian Le Grand supports the introduction of stronger market incentives to prompt improved performance among secondary care providers. He: – notes the positive effect market incentives have had in primary schools – argues that new structures (such as new systems of regulation and performance measurement) will help minimise undesirable consequences – suggests that, in 1991, the NHS .