0% found this document useful (0 votes)
3 views11 pages

Microprocessor and Interfacing

The document outlines a course on Microprocessor and Interfacing, detailing a series of experiments aimed at designing and implementing embedded applications using various platforms such as 8085/8086, 8051, and Arduino. Each experiment includes specific assembly language programs for arithmetic operations, data movement, and device interfacing, along with procedures for executing these programs on the DYNA 8086 kit. The course also emphasizes skills in investigation, communication, teamwork, and technical reporting.

Uploaded by

24et10ha51
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views11 pages

Microprocessor and Interfacing

The document outlines a course on Microprocessor and Interfacing, detailing a series of experiments aimed at designing and implementing embedded applications using various platforms such as 8085/8086, 8051, and Arduino. Each experiment includes specific assembly language programs for arithmetic operations, data movement, and device interfacing, along with procedures for executing these programs on the DYNA 8086 kit. The course also emphasizes skills in investigation, communication, teamwork, and technical reporting.

Uploaded by

24et10ha51
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Microprocessor and Interfacing

LIST OF EXPERIMENTS

Course Objectives: The objective of the course is to design and implement embedded
applications using 8085/8086, 8051, and Arduino platforms.

1.​ Write an assembly language program to perform addition/subtraction of two 8-bit


numbers using the 8086 instruction set.
2.​ Write an assembly language program to perform division/multiplication of two 8-bit
numbers using 8086 instruction set.
3.​ Write an ALP to find the factorial of a given number using a recursive procedure with
8086 instruction set.
4.​ Write an assembly language program to move a data block from location ‘X’ to location
‘Y’ without overlap using 8086 instruction set.
5.​ Write an assembly language program to arrange a set of 8-bit numbers in
ascending/descending order and display the sorted vector.
6.​ Write an assembly language program to convert two BCD numbers to equivalent HEX
using 8086 instruction set.
7.​ Write an assembly language program to perform addition/subtraction of a given number
using 8051 board.
8.​ Write an assembly language program to transfer a block of data bytes from source
memory to destination memory using 8051 board.
9.​ To study the working principle of a stepper motor and interface it with a
microcontroller/microprocessor to control its speed and direction of rotation.
10.​Write an assembly language program to generate waveform using DAC, and observe
output on CRO using microcontroller/microprocessor board.
11.​Write an Arduino IDE program to blink 5 LEDs in sequence with 2-second delay.
12.​Write an Arduino IDE program to implement automatic traffic light control: Red – 4 sec,
Green – 5 sec, Yellow – 2 sec

Course Outcomes
After completing the lab, students will be able to:
CO1. Conduct investigations through systematic performance of experiments.
CO2. Demonstrate ethical behavior and communicate effectively during viva sessions
CO3. Acquire skills for working effectively in groups
CO4. Prepare a technical report on experiments conducted in the lab.
Course Articulation Matrix
PO1 PO2 PO3 PO4 PO5 PO6 PO7 PO8 PO9 PO10 PO11 PSO1 PSO2

CO1 3 3 3 3 3 2 1 2 - 1 2 3 3
CO2 - - 1 - - 1 3 - 3 1 2 2 3
CO3 - 2 3 3 1 2 2 3 2 2 2 2 3
CO4 2 2 2 2 2 2 2 2 2 2 2 3 3
1 - Slightly; 2 - Moderately; 3 – Substantially
PROCEDURE TO EXECUTE PROGRAM
ON DYNA 8086 KIT
1.​ Switch ON the DYNA 8086 microprocessor trainer kit and the power
supply.​

2.​ Press the RES (Reset) key to reset the system.​

3.​ Press the SEG key, enter the segment address (e.g., 0100H), and press INR.​

4.​ Press the OFF key, enter the offset address (e.g., 0100H), and press INR.​

5.​ Enter the program OPCODE byte-by-byte using the hexadecimal keypad.​

6.​ After entering each byte, press INR to increment the memory address.​

7.​ After entering all opcodes, press the EXEC key.​

8.​ Press the GO key to start program execution.​

9.​ Press SEG, enter 0100, then press EXEC.​

10.​Press START, enter 0100, then press EXEC.​

11.​Press Br 0108, then press EXEC to set the break point.​

12.​The display will show F, indicating that the program execution is completed.​

13.​To view the result, press the REG key and then press AX (or BX, CX, DX)
to display register contents.​

14.​To view memory contents, press the MEM key and enter the required
memory address.​

15.​After completion, press RES to stop or restart the system.


8086 Addition and Subtraction Lab Programs
EXPERIMENT – 1 (a): Addition of Two 8-bit Numbers using
8086
AIM:​
To perform addition of two 8-bit numbers using 8086 instruction set.​

DATA (Example):

NUM1 = 25H​
NUM2 = 12H​

PROGRAM OPCODES (Starting Address = 0100H):

B0 25​
B3 12​
02 C3​
CC​

PROGRAM TABLE:

Address Op Code Mnemonic Comments

0100 B0 25 MOV AL,25H Load first number into


AL

0102 B3 12 MOV BL,12H Load second number


into BL

0104 02 C3 ADD AL,BL AL = AL + BL (Sum


stored in AL)

0106 CC INT 3 Stop program /


Display F

PROCEDURE:
1. Switch ON the DYNA 8086 kit.​
2. Press RES to reset.​
3. Press SEG → 0100 → INR.​
4. Press OFF → 0100 → INR.​
5. Enter opcodes and press INR after each byte.​
6. Press EXEC and GO.​
7. View result using REG → AX.​

OUTPUT:​
Sum is stored in AL register.​

RESULT:​
Addition performed successfully.​

EXPERIMENT – 1 (b): Subtraction of Two 8-bit Numbers using


8086
AIM:​
To perform subtraction of two 8-bit numbers using 8086 instruction set.​

DATA (Example):

NUM1 = 25H​
NUM2 = 12H​

PROGRAM OPCODES (Starting Address = 0100H):

B0 25​
B3 12​
2A C3​
CC​

PROGRAM TABLE:

Address Op Code Mnemonic Comments

0100 B0 25 MOV AL,25H Load first number into


AL

0102 B3 12 MOV BL,12H Load second number


into BL

0104 2A C3 SUB AL, BL AL = AL − BL (Result


stored in AL)

0106 CC INT 3 Stop program /


Display F

PROCEDURE:

1. Switch ON the DYNA 8086 kit.​


2. Press RES to reset.​
3. Press SEG → 0100 → INR.​
4. Press OFF → 0100 → INR.​
5. Enter opcodes and press INR after each byte.​
6. Press EXEC and GO.​
7. View result using REG → AX.​

OUTPUT:​
Difference is stored in AL register.​

RESULT:​
Subtraction performed successfully.​

EXPERIMENT – 2 (a): Multiplication of Two 8-bit Numbers
using 8086
AIM: To perform multiplication of two 8-bit numbers using 8086 instruction set.

DATA (Example):

A = 12H​
B = 05H

PROGRAM OPCODES (Starting Address = 0100H):

B0 12​
B3 05​
F6 E3​
CC

PROGRAM TABLE:

Address Op Code Mnemonic Comments

0100 B0 12 MOV AL,12H Load first number


into AL

0102 B3 05 MOV BL,05H Load second number


into BL

0104 F6 E3 MUL BL AX = AL × BL
(Product in AX)

0106 CC INT 3 Stop program /


Display F

PROCEDURE:

1. Switch ON the DYNA 8086 kit and power supply.​


2. Press RES to reset the system.​
3. Press SEG → 0100 → INR.​
4. Press OFF → 0100 → INR.​
5. Enter opcodes byte-by-byte (or assemble/load mnemonics as per lab setup) and press INR
after each byte.​
6. Press EXEC and then GO to execute.​
7. View registers using REG (AX/BX/CX/DX) and memory using MEM.​
8. Display shows F / program stops at INT 3 (CC).​

OUTPUT:

Product is stored in AX register (AH:AL).

RESULT:

Multiplication of two 8-bit numbers was successfully performed on 8086.

EXPERIMENT – 2 (b): Division of Two 8-bit Numbers using


8086
AIM: To perform division of two 8-bit numbers using 8086 instruction set.

DATA (Example):

Dividend = 12H​
Divisor = 05H

PROGRAM OPCODES (Starting Address = 0100H):

B0 12​
B3 05​
B4 00​
F6 F3​
CC

PROGRAM TABLE:

Address Op Code Mnemonic Comments

0100 B0 12 MOV AL,12H Load dividend (low


byte) into AL
0102 B3 05 MOV BL,05H Load divisor into BL

0104 B4 00 MOV AH,00H Clear AH (AX =


00:AL)

0106 F6 F3 DIV BL AL=Quotient,


AH=Remainder

0108 CC INT 3 Stop program /


Display F

PROCEDURE:

1. Switch ON the DYNA 8086 kit and power supply.​


2. Press RES to reset the system.​
3. Press SEG → 0100 → INR.​
4. Press OFF → 0100 → INR.​
5. Enter opcodes byte-by-byte (or assemble/load mnemonics as per lab setup) and press INR
after each byte.​
6. Press EXEC and then GO to execute.​
7. View registers using REG (AX/BX/CX/DX) and memory using MEM.​
8. Display shows F / program stops at INT 3 (CC).​

OUTPUT:

Quotient is stored in AL and Remainder is stored in AH (AX register).

RESULT:

Division of two 8-bit numbers was successfully performed on 8086.


EXPERIMENT – 3

AIM: Write an assembly language program to Move a Block of Data from one
memory location to another with 8086 microprocessor.
APPRATUS: - Dyna 8086 microprocessor kit.
Program:
-​ Press RES
-​ Press SEG (EB/AX) 0100 then Press INR
-​ OFF 0100 then Press INR
-​ Start entering the Op Codes as:
-​ B9 08 00 B8 00 01​8E D8 8E C0 BE 00 20 BF 00 30 FC​F3 A4 CC
-​ Press INR after entering each byte.
-​ The program corresponding to the above mentioned Op Codes is as below:

Address Op Mnemonic Comments


Code Operand
0100 B9 08 00 MOV CX, 0008H Load CX with count (8 bytes to move)
0103 B8 00 01 MOV AX,0100H Load AX with 0100 Segment address

0106 8E D8 MOV DS, AX Load DS with source segment


0108 8E C0 MOV ES, AX Load ES with destination segment
010A BE 00 20 MOV SI, 2000H Load SI with source offset
010D BF 00 30 MOV DI, 3000H Load DI with destination offset
0110 FC CLD Clear direction flag (auto-increment mode)
Move byte from DS:SI to ES:DI, repeat CX
0111 F3 A4 REP MOVSB
times
0113 CC HLT Halt the program

-​ Press EXEC
-​ Press GO
-​ SEG 0100 Press EXEC
-​ START 0100 Press EXEC
-​ Br 0105 Press EXEC
-​ F will be displayed
-​ View Result in register by pressing REG and AX

Result:
Data Output
0303H FCFDH (2’s complement of 0303H)

You might also like