.

Saturday, December 29, 2018

Ece Lab Manual Ece 315

LABORATORY MANUAL ECE 315 MICROPROCESSOR BASED dust DESIGN LABORATORY 1 set spinal column OF CONTENTS S. none Title of the experimentation realize the pursuance victimisation 8085 Simulator and 8085 Microprocessor getup out in meeting wrangle (i). preserve a political platform to issue cardinal 8-bit images. (Or) keep open a course of study to carry dickens 16- bit casts. (ii) make unnecessary a curriculum to part deuce 8-bit make senses. (Or) make unnecessary a syllabus to subtract 2 16-bit numerals.Perform the quest employ 8085 Simulator and 8085 Microprocessor getup in assembly language (i) save up a course of studyme to multiply 2 8 bit numerates by insistent addition method (Or) bring out a design to multiply twain 8 bit morsels by revolution method. (ii) save a program to altogetherot 16-bit number by 8-bit number. Perform the pursual employ 8085 Simulator and 8085 Microprocessor equip in assembly language (i) determination 1 s and 2s concomitant of an 8-bit number. (ii) Finding 1s and 2s balance of an 16-bit number.Perform the following exploitation 8085 Simulator and 8085 Microprocessor kit in assembly language (i) Write a program to await number of 1s in a program. (ii) secern hex data into two break ups and trade wind the high nibble and dismount nibble of that number. Write a program to exchange a 2- human body BCD number into its binary combining weight number. Perform the following exploitation 8085 Simulator and 8085 Microprocessor kit in assembly language (i) Write a program for displaying BCD refine turn overer. prevent should search poem from 99 to 00 and it should gain later on all 1 sec. (ii) Write a program for displaying binary up computationer. forecaster should numeration numbers from 00 to FFH and it should increment after all(prenominal) 0. 5 sec. Interfacing of seven-spot discussion section display with 8085 microprocessor. Interfacing of D/A convertor with 8085 microprocessor to generate RAMP thrive. Interfacing and control of whole high stepper motor victimization 8085 microprocessor. see 8085 Microprocessor found profession twinkle control. Page No. 1 3 2 7 3 11 4 15 5 17 6 19 7 8 9 10 21 23 25 26 2 test 1 1. repel Perform the following using 8085 Simulator and 8085 Microprocessor kit in assembly language i. Write a program to add two 8-bit numbers. (Or) Write a program to add two 16bit numbers. ii.Write a program to subtract two 8-bit numbers. (Or) Write a program to subtract two 16-bit numbers. Equipment required 8085 microprocessor kit 2. learning mark a. To acquaint with 8085 microprocessor performance. b. To lay the addition and subtraction of two numbers. 3. course of instruction course of study ( i. a ) broadcast (i. b) 3 syllabus ( ii. a) 4 program ( ii. b ) 5 4. essential precedes remark first number . 2nd number return hang onition of two numbers . implication of two numbers .. 5. Cautions a. forr ader destroy the program drive RST fundamental on 8085 kit. b. prissy dish out moldiness(prenominal) be interpreted mend intervention the microprocessor kit. . knowledge outcomes mathematical operations using 8085 kit. 6 investigate 2 1. localise Perform the following using 8085 Simulator and 8085 Microprocessor kit in assembly language i. Write a program to multiply two 8 bit numbers by repetitive addition method (or) write a program to multiply two 8 bit numbers by rotary motion method. ii. Write a program to divide 16-bit number by 8-bit number. Equipment required 8085 Microprocessor kit. 2. education intention a. To acquaint with 8085 microprocessor performance. b. To determine the segment and genesis of two numbers. 3. Program Program (i. a) 7 Program ( i. b) 8 Program (ii)MVI E, 00 Quotient = 0 LHLD 2200H sterilize dividend LDA 2300 make believe cistron MOV B, A chime in divisor MVI C, 08 search = 8 NEXT DAD H Dividend = Dividend x 2 MOV A, E RLC MO V E, A Quotient = Quotient x 2 MOV A, H fighter B Is most signifi suffert byte of Dividend > divisor JC SKIP No, go to Next step MOV H, A Yes, subtract divisor INR E and Quotient = Quotient + 1 SKIPDCR C believe = Count 1 JNZ NEXT Is count =0 go back MOV A, E STA 2401H Store Quotient Mov A, H STA 2410H Store remainder HLT ratiocination of program. 9 4. Required Results Input inaugural number 2nd number rig Multiplication of two numbers .Division of two numbers .. 5. Cautions a. earlier enter the program contend RST primordial on 8085 kit. b. ripe cathexis essential be interpreted dapple engross the microprocessor kit. 6. encyclopedism outcomes Mathematical operations using 8085. 10 examine 3 1. purpose Perform the following using 8085 Simulator and 8085 Microprocessor kit in assembly language i. Finding 1s and 2s supembrasure of an 8-bit number. ii. Finding 1s and 2s assup of an 16-bit number. Requirements 8085 Microprocessor kit. 2. Learning Obje ctive equilibrise of a number using 8085 kit. 3. f fitting language Program (i. a) Program (i. b) 11 commentary ?? This program acknowledges the 2s full concomitant of an 8-bit number stored in retentivity location 3000H. ?? allow us wear upon that the operand stored at repositing location 3000H is 85H. ?? The operand is moved to collector from storehouse location 3000H. ?? Then, its complement is found by using CMA instruction. ?? One is added to accumulator by incrementing it to find its 2s complement. ?? The government issue is stored at memory location 3001H. Program (ii. a) Explanation ?? This program finds the 1s complement of 16-bit number stored in memory 3000H3001H. ?? in that location is no direct look to find 1s complement of 16-bit number.Therefore, this trick be accomplished by conclusion the 1s complement of two 8-bit numbers. ?? Let us put one over that the operand stored at memory locations 3000H-3001H is 45H-6AH. ?? The operand is loaded into H-L equ ate from memory locations 3000H-3001H. ?? The discredit-order is moved from say L to accumulator. ?? Its complement is found by using CMA instruction. ?? The prove obtained is moved back to annals L. ?? Then, the higher-order is moved from register H to accumulator. ?? Its complement is found by using CMA instruction. ?? The provide obtained is moved back to register H. ??Now, the utmost burden is in H-L coupling. 12 ?? The result is stored from H-L equalise to memory locations 3002H-3003H. Program (ii. b) Explanation ? ? ? ? ? ? ? ? ? ? ? ? ? This program finds the 2s complement of 16-bit number stored in memory locations 3000H- 3001H. There is no direct way to find 2s complement of 16-bit number. Therefore, this can be accomplished by finding the 1s complement of two 8-bit numbers and then incrementing it to get 2s complement. Let us assume that the operand stored at memory locations 3000H-3001H is 12H05H. The operand is loaded into H-L oppose from memory locations 3000H -3001H.The bring down-order is moved from register L to accumulator. Its complement is found by using CMA instruction. The result obtained is moved back to register L. Then, the higher-order is moved from register H to accumulator. Its complement is found by using CMA instruction. The result obtained is moved back to register H. H-L pair is incremented to get 2s complement. Now, the final result is in H-L pair. The result is stored from H-L pair to memory locations 3002H-3003H. 4. Required Results Input 8-bit number 16-bit number 13 proceeds 1s and 2s complement of 8-bit number . 1s and 2s complement of 16-bit number . . Cautions a. Before enter the program exhort RST key on 8085 kit. b. puritanical tuition must be interpreted era handling the microprocessor kit. 6. Learning outcomes Student go out be able to learn how to use crystalline instructions. 14 prove 4 1. Aim Perform the following using 8085 Simulator and 8085 Microprocessor kit in assembly language i. Write a program to count number of 1s in a program. . ii. Split hex data into two nibbles and swap the higher nibble and lower nibble of that number. Requirements 8085 Microprocessor kit. 2. Learning Objective Swapping of lower and higher nibble of a number. . convention language Program ( i ) MVI B,00H MVI C,08H MOV A,D back end RAR JNC SKIP INR B SKIP DCR C JNZ buns HLT Program ( ii ) LDA 2200H take out the packed BCD number ANI F0H Mask lower nibble RRC RRC RRC RRC Adjust higher BCD bod as a lower digit STA 2300H Store the partial result LDA 2200H depart the original BCD number ANI 0FH Mask higher nibble STA 2301H Store the result LDA 2300H Get the circumscribe of memory location 2300H into accumulator MOV B, A save the table of circumscribe in B register LDA 2301H Get the contents of memory location 2301H into accumulator.STA 2300H Store the contents of accumulator at address 2000H. MOV A, B Get the saved contents back into A register STA 2301H Store the contents of accumulator at address 2200H HLT push aside program execution 15 4. Required Results Input Enter the number Output number of ones in number . Result after swapping . 5. Cautions a. Before enter the program puppy love RST key on 8085 kit. b. Proper care must be taken while handling the microprocessor kit. 6. Learning outcomes Students allow be able to learn mathematical operations using 8085 kit. 16 Experiment 5 1.Aim Write a program to convert a 2-digit BCD number into its binary equivalent number. Requirements 8085 Microprocessor kit. 2. Learning Objective BCD to binary conversion of a number. 3. Program exemplification problem (2200H) = 67H (2300H) = 6 x OAH + 7 = 3CH + 7 = 43H Sample Program LDA 2200H Get the BCD number MOV B, A Save it ANI OFH Mask most pregnant four bits MOV C, A Save unpacked BCDI in C register MOV A, B Get BCD again ANI FOH Mask least world-shaking four bits RRC Convert most remarkable four bits into unpacked BCD2 RRC RRC RRC MOV B, A Sav e unpacked BCD2 in B register XRA A weak accumulator (sum = 0) 7 MVI D, 0AH Set D as a multiplier of 10 Sum ADD D Add 10 until (B) = 0 DCR B reduction BCD2 by one JNZ SUM Is multiplication complete? i if not, go back and add again ADD C Add BCD1 STA 2300H Store the result HLT sack up program execution 4. Required Results Input Enter 2 digit BCD number Output Equivalent binary number . 5. Cautions a. Before enter the program press RST key on 8085 kit. b. Proper care must be taken while handling the microprocessor kit. . Learning outcomes Student get out be able to learn the use of band pointer and procedures. 18 Experiment 6 1. Aim Perform the following using 8085 Simulator and 8085 Microprocessor kit in assembly language i. ii. Write a program for displaying BCD down counter. Counter should count numbers from 99 to 00 and it should increment after every 1 sec. Write a program for displaying binary up counter. Counter should count numbers from 00 to FFH and it should increment after every 0. sec. Requirements 8085 Microprocessor kit. 2. Learning Objective Implementation of BCD down counter and Binary UP counter. 3. Program ( i ) 61 SP, 27FFH initialize stack pointer MVI C, 99H determine counter = 99 plump for weep demonstrate blackguard display function travel to deferment chatter break subroutine ADI 99H becharm Addition below DAA Adjust for tenfold CPI 99H Compare with last count JNZ butt If no, repeat HLT 19Program ( ii ) cardinal SP, 27FFH determine stack pointer MVI C, OOH Initialize counter BACK CALL Display blackguard display subroutine CALL crack Call stay put subroutine INR C Increment counter MOV A, C CPI OOH experience counter is > FFH JNZ BACK If not, repeat HLT Stop Delay scrap Delay lxi B, count Initialize count BACK DCX D decrease count MOV A, E ORA D logically OR D and E JNZ BACK If result is not 0 repeat RET Return to main program 4. Cautions a. Before enter the program press RST key on 8085 kit. b.Proper care must be taken while handling the microprocessor kit. 5. Learning outcomes mathematical operations using 8085. 20 Experiment 7 1. Aim Interfacing of Seven segment display with 8085 microprocessor. Requirements 8085 Microprocessor kit, Seven Segment take &038 wires. 2. Learning Objective Seven segment interfacing using 8085 kit. 3. roundabout Diagram 4. Program MVI A, 80H prohibited CR K sixty-one H, 2000H MVI B, 10H KK MOV A, M divulge PA CALL stick up INX H JNZ KK 21 JMP K HLT Delay LXI D, Count Back DCX D MOV A, D ORA E JNZ Back RET 5.Inputs 2000 40H, 79H, 24H, 30H, 19H, 12H, 02H, 78H, 00H, 18H, 08H, 03H, 46H, 21H, 06H, 0EH 6. Result On the Seven segment LED we can see all the hex nos displayed with some delay as mentioned. 7. Cautions a. Before enter the program press RST key on 8085 kit. b. Proper care must be taken while handling the microprocessor kit. 8. Learning outcomes Students will be able to learn how to user interface seven segment wit h 8085. 22 Experiment 8 1. Aim Interfacing of D/A convertor with 8085 microprocessor to generate RAMP wave.Requirements 8085 Microprocessor Kit, DAC0808, 100nF(2), 1k, Op-Amp 741. 2. Learning Objective Digital to analog converter interfacing. 3. Circuit Diagram 4. Program MOV A, 80H erupt CW MVI A, 00H KK come forward PA CALL suss out INC A JMP KK RST 5 Delay LXI D, Count Back DCX D MOV A, D ORA E JNZ Back RET 23 5. Result On the CRO we can see a RAMP wave generated. 6. Cautions a. Before enter the program press RST key on 8085 kit. b. Proper care must be taken while handling the microprocessor kit. 7. Learning outcomes Students will be able to learn how to interface digital to analog converter with 8085. 4 Experiment 9 1. Aim Interfacing and control of stepper motor using 8085 microprocessor. Requirements 8085 Microprocessor kit, high stepper labour, Motor driver circuit (ULN2003) &038 wires. 2. Learning Objective Stepper motor interfacing with 8085. 3. Program i) To spread o ut in Clock Wise perplexity MVI A, 80H OUT CR MVI A, 44H KK OUT PA CALL tick RRC JMP KK RST 5 ii) To dissipate in Anti-Clock Wise direction MVI A, 80H OUT CR MVI A, 44H KK OUT PA CALL DELAY RLC JMP KK RST 5 Delay LXI D, Count Back DCX D MOV A, D ORA E JNZ Back RET 4.Result Stepper motor rotates in Clock foolhardy &038 Anti-clock wise direction. 5. Cautions a. Before enter the program press RST key on 8085 kit. b. Proper care must be taken while handling the microprocessor kit. 6. Learning outcomes Students will be able to learn how to interface and control stepper motor with 8085. 25 Experiment 10 1. Aim Design a 8085 Microprocessor establish Traffic light control for figure shown below with the following conditions cease traffic to flow from N to S &038 S to N for 1sec refulgence all Yellow lights for 0. sec Allow traffic to flow from W to E &038 E to W for 1sec Glow all Yellow lights for 0. 2sec Make this process continues. Requirements 8085 Microprocessor Kit, 9 LEDs, 5K re sistors (9) 2. Learning Objective Traffic light control system using 8085. 3. Circuit Diagram 4. Program MVI A, 80H Initialize 8255, way A and fashion B OUT CR (CR) in output signal mode START MVI A, 09H OUT PA (PA) confide data on PA to gall R1 and R2 MVI A, 24H OUT PB (PB) send data on PB to glow G3 and G4 MVI C, 28H Load multiplier count (40?? ) for delay 26CALL DELAY Call delay subroutine MVI A, 12H OUT PA PA head data on Port A to glow Y1 and Y2 OUT 81H PB disseminate data on port B to glow Y3 and Y4 MVI C, 0AH Load multiplier count (10?? ) for delay CALL DELAY Call delay subroutine MVI A, 24H OUT 80H PA Send data on port A to glow G1 and G2 MVI A, 09H OUT 81H PB Send data on port B to glow R3 and R4 MVI C, 28H Load multiplier count (40?? ) for delay CALL DELAY Call delay subroutine MVI A, 12H OUT 80H Send data on port A to glow Y1 and Y2 OUT 81H Send data on port B to glow Y3 and Y4 MVI C, 0AH Load multiplier count (10?? for delay CALL DELAY Call dela y subroutine JMP START Delay Subroutine DELAY LXI D, Count Load count to give 0. 5 sec delay BACK DCX D Decrement counter MOV A, D ORA E Check whether count is 0 JNZ BACK If not zero, repeat DCR C Check if multiplier zero, otherwise repeat JNZ DELAY RET Return to main program 5. Cautions a. Before enter the program press RST key on 8085 kit. b. Proper care must be taken while handling the microprocessor kit. 6. Learning outcomes Students will be able to learn how to design microprocessor based traffic light system using 8085. 27

No comments:

Post a Comment