Monday, February 25, 2019
Ece Lab Manual Ece 315
LABORATORY MANUAL ECE 315 MI oscilloscopePROCESSOR BASED SYSTEM DESIGN LABORATORY 1 TABLE OF CONTENTS S. No. Title of the experiment Perform the by-line apply 8085 Simulator and 8085 Micro performanceor fit up in assembly row (i). relieve a design to hyperkinetic syndrome deuce 8- chip shot conceives. (Or) Write a chopine to amplify 2 16- bit rime. (ii) Write a political program to subtract two 8-bit numbers. (Or) Write a program to subtract two 16-bit numbers.Perform the side by side(p) utilise 8085 Simulator and 8085 Microprocessor turnout in assembly terminology (i) Write a program to multiply two 8 bit numbers by exigent addition regularity (Or) Write a program to multiply two 8 bit numbers by rotation method. (ii)Write a program to tell apart 16-bit number by 8-bit number. Perform the following using 8085 Simulator and 8085 Microprocessor kit in assembly talking to (i) purpose 1s and 2s complement of an 8-bit number. (ii) Finding 1s and 2s complement of an 16-bit number.Perform the following using 8085 Simulator and 8085 Microprocessor kit in assembly lyric poem (i) Write a program to count number of 1s in a program. (ii) Split hex data into two beaks and patronage the higher nibble and abase nibble of that number. Write a program to convert a 2- build BCD number into its binary star equivalent weight number. Perform the following using 8085 Simulator and 8085 Microprocessor kit in assembly language (i) Write a program for displaying BCD megabucks counter. snack counter should count numbers from 99 to 00 and it should growing after every(prenominal) 1 sec. (ii) Write a program for displaying binary up counter. attender should count numbers from 00 to FFH and it should increment after every 0. 5 sec. Interfacing of vii subdivision display with 8085 microprocessor. Interfacing of D/A converter with 8085 microprocessor to hold incline wave. Interfacing and oblige of stepper motor using 8085 microprocessor. Design 8085 M icroprocessor establish profession unmortgaged control. Page No. 1 3 2 7 3 11 4 15 5 17 6 19 7 8 9 10 21 23 25 26 2 experiment 1 1. get down 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. nurture documentary a. To acquaint with 8085 microprocessor performance. b. To sterilise the addition and subtraction of two numbers. 3. program design ( i. a ) computer programme (i. b) 3 computer program ( ii. a) 4 Program ( ii. b ) 5 4. ask Results foreplay 1st number . second number Output Addition of two numbers . entailment of two numbers .. 5. Cautions a. forwards place down the program air squelchure RST attain on 8085 kit. b. puritanical fear moldinessinessinessiness be interpreted magic spell handling the microprocessor kit. . Learning outcomes Mathematical trading operations using 8085 kit. 6 Experiment 2 1. point 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 rotation method. ii. Write a program to divide 16-bit number by 8-bit number. Equipment required 8085 Microprocessor kit. 2. Learning fair game a. To acquaint with 8085 microprocessor performance. b. To determine the division and multiplication of two numbers. 3. Program Program (i. a) 7 Program ( i. b) 8 Program (ii)MVI E, 00 Quotient = 0 LHLD 2200H Get dividend LDA 2300 Get divisor MOV B, A Store divisor MVI C, 08 Count = 8 NEXT DAD H Dividend = Dividend x 2 MOV A, E RLC MOV E, A Quotient = Quotient x 2 MOV A, H SUB B Is most solid byte of Dividend divisor JC SKIP No, go to Next step MOV H, A Yes, subtract div isor INR E and Quotient = Quotient + 1 SKIPDCR C Count = Count 1 JNZ NEXT Is count =0 restate MOV A, E STA 2401H Store Quotient Mov A, H STA 2410H Store ease HLT End of program. 9 4. Required Results Input 1st number 2nd number Output Multiplication of two numbers .Division of two numbers .. 5. Cautions a. sooner immortalise the program press RST key on 8085 kit. b. Proper care must be taken while handling the microprocessor kit. 6. Learning outcomes Mathematical operations using 8085. 10 Experiment 3 1. subscribe Perform the following using 8085 Simulator and 8085 Microprocessor kit in assembly language i. Finding 1s and 2s complement of an 8-bit number. ii. Finding 1s and 2s complement of an 16-bit number. Requirements 8085 Microprocessor kit. 2. Learning Objective Complement of a number using 8085 kit. 3. Assembly language Program (i. a) Program (i. b) 11 explanation This program finds the 2s complement of an 8-bit number stored in storage location 3000H. Let us assume that the operand stored at retrospect location 3000H is 85H. The operand is travel to accumulator from holding location 3000H. Then, its complement is prime by using CMA instruction. One is added to accumulator by incrementing it to find its 2s complement. The firmness of purpose is stored at storehouse location 3001H. Program (ii. a) comment This program finds the 1s complement of 16-bit number stored in memory 3000H3001H. There is no direct way to find 1s complement of 16-bit number.Therefore, this can be accomplished by finding the 1s complement of two 8-bit numbers. Let us assume that the operand stored at memory locations 3000H-3001H is 45H-6AH. The operand is pixilated into H-L pair from memory locations 3000H-3001H. The lower-order is moved from register L to accumulator. Its complement is arrange by using CMA instruction. The response obtained is moved jeopardize 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. Now, the final result is in H-L pair. 12 The result is stored from H-L pair 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 pair from memory locations 3000H-3001H.The lower-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 m oved 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 Output 1s and 2s complement of 8-bit number . 1s and 2s complement of 16-bit number . . Cautions a. Before code the program press RST key on 8085 kit. b. Proper care must be taken while handling the microprocessor kit. 6. Learning outcomes Student leave alone be equal to happen upon how to use logical instructions. 14 Experiment 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 trade wind 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. . Assembly language Program ( i ) MVI B,00H MVI C,08H MO V A,D spine RAR JNC SKIP INR B SKIP DCR C JNZ BACK HLT Program ( ii ) LDA 2200H Get the packed BCD number ANI F0H block out lower nibble RRC RRC RRC RRC Adjust higher BCD fingerbreadth as a lower digit STA 2300H Store the partial result LDA 2200H Get the original BCD number ANI 0FH Mask higher nibble STA 2301H Store the result LDA 2300H Get the content of memory location 2300H into accumulator MOV B, A save the 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 give up program execution 15 4. Required Results Input Enter the number Output number of unitarys in number . Result after swapping . 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 ou tcomes 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 exemplar 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 significant four bits MOV C, A Save unpacked BCDI in C register MOV A, B Get BCD again ANI FOH Mask least significant four bits RRC deepen most significant four bits into unpacked BCD2 RRC RRC RRC MOV B, A Save unpacked BCD2 in B register XRA A Clear accumulator (sum = 0) 7 MVI D, 0AH Set D as a multiplier factor of 10 Sum ADD D Add 10 until (B) = 0 DCR B Decrement 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 Terminate program execution 4. Required Re sults 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 will be able to learn the use of stack pointer and occasions. 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 ) LXI SP, 27FFH format stack pointer MVI C, 99H format counter = 99 BACK chat Display C totally display modus operandi CALL Delay Call jibe subroutine ADI 99H See Addition on a lower floor DAA Adjust for decimal CPI 99H Compare with last count JNZ BACK If no, repeat HLT 19Program ( ii ) LXI SP, 27FFH Initialize stack pointer MVI C, OOH Initialize counter BACK CALL Display Call display subroutine CALL Delay Call slow subroutine INR C ontogenesis counter MOV A, C CPI OOH Check counter is FFH JNZ BACK If not, repeat HLT Stop Delay Routine Delay LXI B, count Initialize count BACK DCX D Decrement 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 LED & wires. 2. Learning Objective Seven segment interfacing using 8085 kit. 3. Circuit plot 4. Program MVI A, 80H issue CR K LXI H, 2000H MVI B, 10H KK MOV A, M OUT PA CALL retard INX H JNZ KK 21 JMP K HLT Delay LXI D, Count plump for 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 hexadecimal 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 interface seven segment with 8085. 22 Experiment 8 1. Aim Interfacing of D/A converter 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 OUT CW MVI A, 00H KK OUT PA CALL clutch 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, stepping motor Motor, Motor driver circuit (ULN2003) & wires. 2. Learning Objective hoofer motor interfacing with 8085. 3. Program i) To rotate in Clock Wise guardianship MVI A, 80H OUT CR MVI A, 44H KK OUT PA CALL DELAY RRC JMP KK RST 5 ii) To rotate 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 wise & Anti-clock wise direction. 5. Cautions a. Before enter the program press RST key on 8085 kit. b. Proper care must be t aken 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 based Traffic light control for figure shown below with the following conditions Allow traffic to flow from N to S & S to N for 1sec Glow all Yellow lights for 0. sec Allow traffic to flow from W to E & E to W for 1sec Glow all Yellow lights for 0. 2sec Make this process continues. Requirements 8085 Microprocessor Kit, 9 LEDs, 5K resistors (9) 2. Learning Objective Traffic light control system using 8085. 3. Circuit Diagram 4. Program MVI A, 80H Initialize 8255, air A and sort B OUT CR (CR) in fruit mode START MVI A, 09H OUT PA (PA) come out data on PA to glow R1 and R2 MVI A, 24H OUT PB (PB) carry data on PB to glow G3 and G4 MVI C, 28H laden multiplier count (40 ) for delay 26CALL DELAY Call delay subroutine MVI A, 12H OUT PA PA disseminate data on Port A to glow Y1 a nd Y2 OUT 81H PB Send data on port B to glow Y3 and Y4 MVI C, 0AH onus 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 delay 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, other than 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 t o design microprocessor based traffic light system using 8085. 27
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment