Microprocessor & Microcontroller Lab 2021
Microprocessor & Microcontroller Lab 2021
EXPERIMENT NO:-01
Name of the Experiment:- Hexadecimal addition of two 8-bits number.
Description:- The program execute from 2000, taken the content of 2501 adds it
to 2502 and store the result at 2503.
PROGRAM:-
DATA:-
2501--- 49 H
2502--- 56 H
Result:-
2503--- 9F H
The Assembly Language Program for two 8-bits addition of the number was
executed successfully by using 8085 Microprocessor Kit .
EXPERIMENT NO:-02
Name of the Experiment:- Hexadecimal subtraction of two 8-bits number.
Description:- The program execute from 2000, taken the content of 2501
subtracts it to 2502 and store the result at 2503.
PROGRAM:-
DATA:-
2501--- 49 H
2502--- 32 H
Result:-
2503--- 17 H
The Assembly Language Program for two 8-bits subtraction of the
number was executed successfully by using 8085 Microprocessor Kit.
EXPERIMENT NO:-03
Name of the Experiment:- Write an ALP to find the largest number in an data
array.
PROGRAM:-
maximum?
DATA:-
2500--- 03
2501--- 98
2502--- 75
2503--- 99
Result:-
2450--- 99
The Assembly Language Program to find the largest number was executed
successfully by using 8085 Microprocessor Kit.
EXPERIMENT NO:-04
Name of the Experiment:- Write an ALP to arrange the number of data array in
ascending order.
PROGRAM:-
greatest
number.
200D D2, 16,20 JNC AHEAD If previous
greatest number
> next number,
go to AHEAD
2010 2B DCX H
2011 77 MOV M, A Place smaller of
the two
compared
numbers in
memory.
2012 78 MOV A, B Place greater of
the two
numbers in
accumulator.
2013 C3, 18, 20 JMP GO
2016 2B AHEAD DCX H
2017 70 MOV M, B Place smaller of
the two
compared
numbers in
memory.
2018 23 GO INX H
2019 15 DCR D Decrease the
count for
comparisons
201A C2, 0A,20 JNZ LOOP
201D 77 MOV M, A Place the
greatest number
after address
pass in the
memory.
201E 0D DCR C Decrease the
count for passes
201F C2, 04, 20 JNZ BACK
2022 76 HLT Stop
DATA:- Result:-
2501--- 60 15
2502--- 40 25
2503--- 50 40
2504--- 15 50
2505--- 25 60
EXPERIMENT NO:-05
Name of the Experiment:- Write an ALP for hexadecimal multiplication of two
8-bits number.
Description:- The program execute from 2000, taken the content of 2501, 2502,
2503 multiply the data and store the result at 2504 and 2505.
PROGRAM:-
AHEAD.
2011 19 DAD D Product =
Product +
Multiplicand
2012 0D AHEAD DCR C Decrement
count.
2013 C2, 0C, 20 JNZ LOOP
2016 22, 04, 25 SHLD 2504 H Store result.
2019 76 HLT Stop
DATA:-
2503--- 56 H, Multiplier.
Result:-
The Assembly Language Program for two 8-bits multiplication of the number was
executed successfully by using 8085 Microprocessor Kit.
EXPERIMENT NO:-06
Name of the Experiment:- Write a program in assembly language to generate
1KHz square wave on port line of 8051.
Aim:- The main aims of this interfacing using microcontroller is to generate square
wave .
Apparatus Required:-
Procedure:-
PROGRAM:-
Result:-
EXPERIMENT NO:-07
Aim:- The main aims of this interfacing using microcontroller is to display the
rolling message “HELP US” in the display.
Apparatus Required:-
Procedure:-
PROGRAM:-
Result:-
The above assembly language programs are encoded in the microcontroller for
display consisting “HELP US” in the LCD display which is interfaced with the
8051 microcontroller.
EXPERIMENT NO:-08
Apparatus Required:-
Procedure:-
1. Enter the opcodes from 4100 and the data from 412C.
2. Execute the program.
3. Obtain different speed of stepper motor by varying the values in location
411B and 411D.
PROGRAM:-
Result:-
Enter the above program starting from location 4100. Execute the same. The
Stepper motor rotates. Speed can be varied by varying the opcode of location
4112B and 411D.
EXPERIMENT NO:-09
Aim:- The main aims of this interfacing using microcontroller is to convert analog
data into digital data.
Apparatus Required:-
Procedure:-
PROGRAM:-
Result:-
EXPERIMENT NO:-10
Apparatus Required:-
Procedure:-
1. Enter the opcodes from 4100 and the data from 41A4.
2. Execute the program
PROGRAM:-
4116 GO:
411F 09 INC R1
412D 09 INC R1
413B 09 INC R1
414C 0B INC R3
415A 0B INC R3
4168 0B INC R3
4181 22 RET
418E 22 RET
4192 92 2B 10 DB 92H,2BH,10H
4195 84 9D 10 DB 84H,9DH,10H
4198 84 2E 48 DB 84H,2EH,48H
419E 92 4B 10 DB 92H,4BH,10H
41A1 84 9D 20 DB 84H,9DH,20H
41A4 04 2E 49 DB 04H,2EH,49H
END
Result:-