








































































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!









































































To know the method of programming the microprocessor and also the design, modeling & analysis of basic electrical, hydraulic & pneumatic Systems which enable the students to understand the concept of mechatronics. LIST OF EXPERIMENTS
S.NO NAME OF THE EQUIPMENT Qty
1 Basic Pneumatic Trainer Kit with manual and electrical controls/ PLCControl each 1
2 Basic Hydraulic Trainer Kit^ 1 3 Hydraulics and Pneumatics Systems Simulation Software 10
4 8051 - Microcontroller kit with stepper motor and drive circuit sets 2
5 Image processing system with hardware & software 1
S.No DATE NAME OF THE EXPERIMENTS PAGE NO
Ex No : 1(a) Date : ADDITION OF TWO 8-BIT NUMBERS
To write an assembly language for adding two 8 bit numbers by using micro processor kit. APPARATUS REQUIRED
Address Label Mnemonics Hex Code Comments 4100 MVI C,00 OE, 00 Initialize the carry as zero
Calculation 1111 1111 1111 1111
(1)
Thus the assembly language program for 8 bit addition of two numbers was executed successfully by using 8085 micro processing kit.
Address Label Mnemonics Hex Code Comments 4100 MVI C,00 OE, 00 Initialize the carry as zero 4102 LDA 4300 3A, (00, 43) Load the first 8 bit data 4105 MOV, B,A 47 Copy the value of 8 bit data into register B 4106 LDA 4301 3A, (01, 43) Load the second 8 bit data into the accumulator 4109 ADD B 80 Add the hoo values 410A JNC D2, 0E, 41 Jump on if no carry 410D INR C OC If carry is there increment it by one 410E Loop STA 4302 32 (02, 43) Stone the added value in the accumulator 4111 MOV A,C 79 More the value of carry to the accumulator from register C 4112 STA 4303 32 (03, 43) Store the value of carry in the accumulator 4115 HLT 76 Stop the program execution
Input
Without borrow
Input Address Value 4300 05 4301 07 Output Address Value 4302 02 4303 00 (borrow)
With carry
borrow Input Address Value 4300 07 4301 05 Output Address Value 4302 02
Calculation:
05 - 07 07 - 0111 CMA 1000 ADJ 0.1 0001
1001 05 - 0101
1110 (-
Address Label Mnemonics Hex Code Comments
4100 LDA 4500 3A, 00, 45 Load the first 8 bit number 4103 MOV B,A 47 Move the 1 8st^ bit data to register โBโ
4104 LDA 4501 3A, 01, 45
nd Load the 2 16 bit number 4107 MOV C,A 4F Move the 2 8 bit data to register โCโ 4108 MVI A, 00 3E, 00 Intialise the accumulator as zero 410A MVI D, 00 16, 00 Intialise the carry as zero 410C ADD B 80 Add the contents of โBโ and accumulator 410D INC D2 11, 41 Jump if no carry 4110 INR D 14 Increment carry if there is 4111 DCR C OD Decrement the value โCโ 4112 JNZ C2 0C, 41 Jump if number zero 4115 STA 4502 32 02, 45 Store the result in accumulator 4118 MOV A,D 7A Move the carry into accumulator
4119 STA 4503 32,03,45 Store the result in accumulator
411C HLT 76 Stop the program execution
Input Input Address Value 4500 04 4501 02
Output
Output Address Value 4502 08 4503 00
Address Label Mnemonics Hex Code Comments
4100 MVI C, 00 0E, 00 Intialise Quotient as zero 4102 LDA, 4500 3A 00, 45 Get the 1stdata
4105 MOV B,A 47 Copy the 1
st data into register โBโ
nd Get the 2 data 4109 CMP B B8 Compare the 2 values 410A JC (LDP) DA 12,41 Jump if dividend lesser than divisor
410D Loop 2 SUB B 90
st nd Subtract the 1 value by 2 value 410E INR C 0C Increment Quotient (410D) 410F JMP (LDP, 41) C3, 0D, 41 Jump to Loop 1 till the value of dividend becomes zero 4112 Loop 1 STA 4502 32 02,45 Store the value in accumulator 4115 MOV A,C 79 Move the value of remainder
to accumulator
4116 STA 4503 32 03,45 Store the remainder value in
accumulator
4119 HLT 76 Stop the program execution
Input Input Address Value 4500 09 4501 02 Output Output Address Value 4502 04 (quotient) 4503 01 (reminder)
Address Label Mnemonics Hex Code Comments
4100 LDA 4500 3A, 00,45 Load the number of values 4103 MOV B,A 47 Move it โBโ register 4104 DCR B 05 For (N-1) comparisons 4105 Loop 3 LXI H, 4500 21, 00,45 Set the pointer for array 4108 MOV C,M 4E Count for (N-1) comparisons 4109 DCR C 0D For (N-1) comparisons 410A INX H 23 Increment pointer 410B Loop 2 MOV A,M 7E Get one data in array โAโ 410C INX H 23 Increment pointer 410D CMP M BE Compare next with accumulator 410E JC DA, 16, 41 If content less memory go ahead 4111 MOV D,M 56 If it is greater than interchange it 4112 MOV M,A 77 Memory content 4113 DCX H 2B Exchange the content of memory pointed by โHLโ by
previous location 4114 MOV M,D 72 One in by โHLโ and previous location 4115 INX H 23 Increment pointer 4116 Loop 1 DCR C 0D Decrement โCโ register 4117 JNZ Loop 1 C2, 0B, 41 Repeat until โCโ is zero 411B JNZ Loop 2 C2, 05, 41 Repeat till โBโ is zero 411E HLT 76 Stop the program execution
Input
Input Address Value 4500 04 4501 AB 4502 BC 4503 01 4504 0A Output Address & Value Output Address Value 4500 04 4501 01 4502 0A 4503 AB 4504 BC