0% found this document useful (0 votes)
38 views86 pages

Ee6612 Microprocessor and Microcontroller Laboratory

Lab materials

Uploaded by

eee2014.rvs
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)
38 views86 pages

Ee6612 Microprocessor and Microcontroller Laboratory

Lab materials

Uploaded by

eee2014.rvs
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
You are on page 1/ 86

ww

w.E
asy
En
gi nee
rin
g .ne
t

**Note: Other Websites/Blogs Owners Please do not Copy (or) Republish


this Materials, Students & Graduates if You Find the Same Materials with
EasyEngineering.net Watermarks or Logo, Kindly report us to
[email protected]
Visit : www.EasyEngineering.net
EE6612 MICROPROCESSOR AND MICROCONTROLLER LABORATORY 1

Dharmapuri – 636 703


For more Visit : www.EasyEngineering.net

LAB MANUAL

ww
Regulation
w.E : 2013
Branch : B.E. - EEE
asy
Year & Semester
En
: III Year / VI Semester
gin
EE6612-MICROPROCESSOR AND MICROCONTROLLER LAB eer
ing
.ne
t
ICAL ENG

VVIT - DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING

Visit : www.EasyEngineering.net
EE6612 MICROPROCESSOR AND MICROCONTROLLER LABORATORY 2

ANNA UNIVERSITY: CHENNAI


REGULATION - 2013
SYLLABUS

EE6612 MICROPROCESSOR AND MICROCONTROLLER


LABORATORY

OBJECTIVES:

ww To provide training on programming of microprocessors and microcontrollers and understand the


interface requirements.

w.E
LIST OF EXPERIMENTS:

asy
1. Simple arithmetic operations: addition / subtraction / multiplication / division.
2. Programming with control instructions:

En
(i) Ascending / Descending order, Maximum / Minimum of numbers
(ii) Programs using Rotate instructions
(iii)Hex / ASCII / BCD code conversions. gin
3. Interface Experiments: with 8085
(i) A/D Interfacing. & D/A Interfacing. eer
4. Traffic light controller.
5. I/O Port / Serial communication ing
6. Programming Practices with Simulators/Emulators/open source
7. Read a key, interface display .ne
8. Demonstration of basic instructions with 8051 Micro controller execution, including:
(i) Conditional jumps, looping
(ii) Calling subroutines.
t
9. Programming I/O Port 8051
(i) study on interface with A/D & D/A
(ii) study on interface with DC & AC motor .
10. Mini project development with processors.
TOTAL: 45 PERIODS

VVIT - DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING

Visit : www.EasyEngineering.net
EE6612 MICROPROCESSOR AND MICROCONTROLLER LABORATORY 3

INDEX

EX.NO DATE NAME OF THE EXPERIMENT STAFF SIGN REMARKS

PROGRAM FOR 8 BIT ADDITION USING


1 8085

PROGRAM FOR 8 BIT SUBTRACTION


2 USING 8085

PROGRAM FOR 8 BIT MULTIPLICATION


3
ww USING 8085

4
w.E PROGRAM FOR 8 BIT DIVISION USING
8085

5 asy
PROGRAM TO FIND THE LARGEST
NUMBER IN GIVEN ARRAY USING 8085

6 En
PROGRAM TO FIND THE SMALLEST

gin
NUMBER IN GIVEN ARRAY USING 8085

7
PROGRAM FOR SORT ASCENDING ORDER
USING 8085
eer
8
PROGRAM FOR SORT DESCENDING
ing
.ne
ORDER USING 8085

9
PROGRAM FOR CODE CONVERSION OF
HEX TO DECIMAL

PROGRAM FOR CODE CONVERSION OF


t
10 DECIMAL TO HEX

PROGRAM FOR CODE CONVERSION OF


11 BINARY TO ASCII

PROGRAM FOR CODE CONVERSION OF


12 ASCII TO BINARY

VVIT - DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING

Visit : www.EasyEngineering.net
EE6612 MICROPROCESSOR AND MICROCONTROLLER LABORATORY 4

EX.NO DATE NAME OF THE EXPERIMENT STAFF SIGN REMARKS

PROGRAM FOR INTERFACING OF ADC


13 WITH 8085

PROGRAM FOR INTERFACING OF DAC


14 WITH 8085

PROGRAM FOR INTERFACING OF SERIAL


15 PORT COMMUNICATION WITH 8085

PROGRAM FOR INTERFACING OF


16
ww KEYBOARD AND DISPLAY WITH 8085

PROGRAM FOR INTERFACING OF


17
w.E TRAFFIC LIGHT CONTROLLER WITH 8085

18 8051
asy
PROGRAM FOR 8 BIT ADDITION USING

19 USING 8051 En
PROGRAM FOR 8 BIT SUBTRACTION

gin
PROGRAM FOR 8 BIT MULTIPLICATION
20 USING 8051
eer
21
PROGRAM FOR 8 BIT DIVISION USING
8051
ing
22
PROGRAM FOR INTERFACING OF ADC
WITH 8051 .ne
23
PROGRAM FOR INTERFACING OF DAC
WITH 8051
t
PROGRAM FOR INTERFACING OF
24 STEPPER MOTOR WITH 8051

VVIT - DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING

Visit : www.EasyEngineering.net
EE6612 MICROPROCESSOR AND MICROCONTROLLER LABORATORY 5

Ex No : 1
Date :
PROGRAM FOR 8 BIT ADDITION USING 8085

AIM:
To write an assembly language program for addition of two 8 bit data using 8085
microprocessor.

APPARATUS REQUIRED:

Sl.No Name of the Apparatus Qty


1 8085 Microprocessor kit 1

ww 2 +5Volts Power Supply 1

ALGORITHM:
3
w.E
Keyboard Connector 1

asy
1. Clear the register C

En
2. Initialize the memory pointer to data location.

gin
3. Get the first Data from memory Location and move to register A.

eer
4. Get the second data from memory location.
5. Add first and second data.
6. If carry the increment the register C by one.
ing
7. Store the result to memory location.
.ne
t

VVIT - DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING

Visit : www.EasyEngineering.net
EE6612 MICROPROCESSOR AND MICROCONTROLLER LABORATORY 6

FLOW CHART: (8 bit Addition)

START

Clear the “C” Register

Initialize Memory Location and get the first data from memory

ww ge Get the Second data from memory Location

w.E
ge
asy
Add the first and Second data’s

ge En If
NO

carry=1?
gin
Yes
eer
Increment “C” register by One ing
.ne
ge Store the Result to Memory Location

STOP
t
ge

VVIT - DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING

Visit : www.EasyEngineering.net
EE6612 MICROPROCESSOR AND MICROCONTROLLER LABORATORY 7

PROGRAM:

ADDRESS LABEL MNEMONICS OPCODE COMMENTS

8000 MVI C,00 Clear the “C” Register


LXI H,9200 Initialize the memory pointer
MOV A,M Move the First Data to A Register
INX H Increment the memory pointer

ww ADD M
JNC LOOP1
Add First and Second Data
Jump if No Carry to loop1

w.E Loop1
INR C
STA 9500
Increment the “C” register by one
Store the Result

asy
MOV A,C
Move the Carry result to Register
“A”
STA 9501
HLT En Store the Carry Result
Stop the program

gin
Input: eer
Memory location Data ing
9200
.ne
Output:
9201
t
Memory location Data
9500
9501

Result :
Thus the addition of two 8 bit data’s was executed using the 8085 microprocessor.

VVIT - DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING

Visit : www.EasyEngineering.net
EE6612 MICROPROCESSOR AND MICROCONTROLLER LABORATORY 8

Ex No : 2
Date :
PROGRAM FOR 8 BIT SUBTRACTION USING 8085

AIM:

To write an assembly language program for subtraction of two 8 bit data using 8085
microprocessor.

APPARATUS REQUIRED:

Sl.No Name of the Apparatus Qty

ww 1
2
8085 Microprocessor kit
+5Volts Power Supply
1
1

ALGORITHM:
w.E
3 Keyboard Connector 1

asy
1. Clear the register “C”

En
2. Initialize the memory pointer to data location.

gin
3. Get the first Data from memory Location and move to register “A”.
4. Get the second data from memory location.
5. Subtract the first and second data.
eer
6. If occur carry the increment the register ‘c’ by one.
7. Store the result to memory location. ing
.ne
t

VVIT - DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING

Visit : www.EasyEngineering.net
EE6612 MICROPROCESSOR AND MICROCONTROLLER LABORATORY 9

FLOW CHART: (8 bit Subtraction)

START

Clear the “C” Register

ww
w.E
Initialize Memory Location and get the first data from memory

ge asy
Get the Second data from memory Location

En
ge
gin
Subtract the first and Second data’s

eer
ge If
carry=1?
YES
ing
NO .ne
Increment “C” register by One t
ge Store the Result to Memory Location

STOP
ge

VVIT - DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING

Visit : www.EasyEngineering.net
EE6612 MICROPROCESSOR AND MICROCONTROLLER LABORATORY 10

PROGRAM:

ADDRESS LABEL MNEMONICS OPCODE COMMENTS

8000 MVI C,00 Clear the “C” Register


LXI H,9200 Initialize the memory pointer
MOV A,M Move the First Data to A
Register
INX H Increment the memory pointer
SUB M Subtract First and Second Data

ww JNC LOOP1 Jump if No Carry to loop1

w.E INR C

CMA
Increment the “C” register by
one
Complement the Accumulator

asy
ADI 01 Add by one for two’s
complement
Loop1 STA 9500
En Store the Result
MOV A,C
gin Move the Carry result to
Register “A”
STA 9501
HLT eer Store the Carry Result
Stop the program

ing
.ne
t

VVIT - DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING

Visit : www.EasyEngineering.net
EE6612 MICROPROCESSOR AND MICROCONTROLLER LABORATORY 11

Input:

Memory location Data


9200
9201

Output:

Memory location Data


9500

ww 9501

w.E
asy
En
gin
eer
ing
.ne
t
RESULT :
Thus the subtraction of two numbers was performed using the 8085 microprocessor.

VVIT - DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING

Visit : www.EasyEngineering.net
EE6612 MICROPROCESSOR AND MICROCONTROLLER LABORATORY 12

Exp No : 3
Date :

PROGRAM FOR 8 BIT MULTIPLICATION USING 8085


AIM:
To write an assembly language program for multiplication of two 8 bit data using 8085
microprocessor.

APPARATUS REQUIRED:

Sl.No Name of the Apparatus Qty


1 8085 Microprocessor kit 1

ww 2
3
+5Volts Power Supply
Keyboard Connector
1
1

ALGORITHM: w.E
1. Clear the register “A”
asy
En
2. Initialize the memory pointer to data location.
3. Get the first Data from memory Location and move to register “C”.
4. Get the second data from memory location.
gin
eer
5. Add the Memory Data and A Register.
6. Decrement the register ‘c’ by one
7. Check the register “C’ is Zero otherwise repeat step 5.
8. Store the result to memory location. ing
PROGRAM :
.ne
ADDRESS LABEL MNEMONICS OPCODE COMMENTS
t
8000 MVI A,00 Clear the “A” Register
LXI H,9200 Initialize the memory pointer
MOV C,M Move the First Data to C Reg
INX H Increment the memory pointer
Loop1 ADD M Add First and Second Data
DCR C Decrement C register by one
JNZ LOOP1 Jump if No Zero to loop1
STA 9500 Store the Result
HLT Stop the program

VVIT - DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING

Visit : www.EasyEngineering.net
EE6612 MICROPROCESSOR AND MICROCONTROLLER LABORATORY 13

FLOW CHART: (8 bit Multiplication)

START

Clear the “C” Register

Initialize Memory Location and get the first data from memory

ge Get the Second data from memory Location

ww
w.E
AddgeRegister “A” and memory Register then decrement register “c” by 1

ge asy If C=0? NO

En
Yes
gin
Store the Result to Memory Location
eer
STOP
ing
ge
.ne
t

VVIT - DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING

Visit : www.EasyEngineering.net
EE6612 MICROPROCESSOR AND MICROCONTROLLER LABORATORY 14

Input:

Memory location Data


9200
9201

Output:

Memory location Data


9500

ww
w.E
asy
En
gin
eer
ing
.ne
t
RESULT:

Thus the multiplication of two numbers was performed using the 8085 microprocessor.

VVIT - DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING

Visit : www.EasyEngineering.net
EE6612 MICROPROCESSOR AND MICROCONTROLLER LABORATORY 15

Exp No : 4
Date :

PROGRAM FOR 8 BIT DIVISION USING 8085


AIM:

To write an assembly language program for division of two 8 bit data using 8085 microprocessor.

APPARATUS REQUIRED:

Sl.No Name of the Apparatus Qty


1 8085 Microprocessor kit 1

ww2
3
+5Volts Power Supply
Keyboard Connector
1
1

ALGORITHM: w.E
asy
1. Clear the Register “C”.
2. Initialize the Memory Pointer.

En
3. Get the First Data from memory to Accumulator ( Dividend)

gin
4. Get the Second Data from memory (Divisor)
5. Compare Register “A” and “M”

eer
6. If No carry, Subtract Divisor from Dividend [(A)-(M)]
7. Increment Register “C” by one.
8. Compare Register “A” and “M” ing
9. If No Carry go to step 6
.ne
10. Store the result to memory location.
t

VVIT - DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING

Visit : www.EasyEngineering.net
EE6612 MICROPROCESSOR AND MICROCONTROLLER LABORATORY 16

FLOWCHART: (8 bit Division)


Start

Get the First Data from memory to register ”A”

Get the Second Data from memory

Compare register A and M register

ww Clear the register “C”

w.E If Cy=1? Yes

asy No
Subtract register M from register A

En
gin
Compare register A and M register

No
If Cy=1? eer
ing
Yes
Store the result to Memory Location .ne
STOP
t

VVIT - DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING

Visit : www.EasyEngineering.net
EE6612 MICROPROCESSOR AND MICROCONTROLLER LABORATORY 17

PROGRAM:

ADDRESS LABEL MNEMONICS OPCODE COMMENTS

8000 MVI C,00 Clear the “C” Register


LXI H,9200 Initialize the memory pointer
MOV A,M Move the First Data to A
Register
INX H Increment the memory pointer
CMP M Compare register A and M
data’s

ww Loop2
JC Loop1
SUB M
If carry jump to loop1
Subtract register A and M Data

w.E INR C
CMP M
Increment C register by one
Compare register A and M

asy
JNC Loop2
data’s
Jump if No Carry to loop2
STA 9500
En Store the Quotient Result
MOV A,C
STA 9501 gin Move register C to A
Store the Remainder Result
HLT
eer Stop the program
Loop1 MVI A,00
STA 9500 ing
Clear the accumulator
Store the result
STA 9501 Store the result
stop .ne
t
HLT

VVIT - DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING

Visit : www.EasyEngineering.net
EE6612 MICROPROCESSOR AND MICROCONTROLLER LABORATORY 18

Input:

Memory location Data

9200

9201

Output:

ww Memory location Data

w.E 9500

9501
asy
En
gin
eer
ing
.ne
t
RESULT :

Thus the division of two numbers was performed using the 8085 microprocessor.

VVIT - DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING

Visit : www.EasyEngineering.net
EE6612 MICROPROCESSOR AND MICROCONTROLLER LABORATORY 19

Exp No : 5
Date :

LARGEST NUMBER OF PROGRAM IN A GIVEN ARRAY

AIM:
To write an assembly language program to find the largest number in a given array using
8085 microprocessor.

APPARATUS REQUIRED:

Sl.No Name of the Apparatus Qty

ww 1 8085 Microprocessor kit 1

3
w.E +5Volts Power Supply

Keyboard Connector
1

asy
ALGORITHM:
En
1. Initialize the Memory Pointer.
2. Load the number of array to B register. gin
3. Move the first data to register A.
eer
4. Increment the Memory pointer.
5. Compare the register A and M . ing
6. If No carry jump to loop2. .ne
7. Move the register M to A.
8. Decrement the register B by one.
t
9. Check register B is Zero otherwise go to step 4.
10. Store the Largest value to memory location.
11. Stop.

VVIT - DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING

Visit : www.EasyEngineering.net
EE6612 MICROPROCESSOR AND MICROCONTROLLER LABORATORY 20

FLOWCHART: (LARGEST NUMBER)

START

Initialize the Memory location

Load the counter to register B

Move the first data to register A

ww
w.E Increment the memory location

Compare the register A and M

asy
En
If cy=0? Yes

gin
eer
No
No
Move the memory data to register A

ing
Check Reg B=0? .ne
Yes
t
Move the result to memory location

STOP

VVIT - DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING

Visit : www.EasyEngineering.net
EE6612 MICROPROCESSOR AND MICROCONTROLLER LABORATORY 21

PROGRAM:

ADDRES OPCOD
LABEL MNEMONICS COMMENTS
S E

8000 LXI H,9100 Initialize the memory pointer


MVI B,04 Load the counter to register B

ww MOV A,M Move the First Data to A


Register

w.E Loop1 INX H


CMP M
Increment the memory pointer
Compare register A and M datas

asy
JNC Loop2 If No carry jump to loop2
MOV A, M
En Move register M to A
LOOP2 DCR B
CMP M gin Decrement B register by one
Compare register A and M

JNZ Loop1 eer data’s


Jump if No Zero to loop1
STA 9500
ing
Store the Result to memory
HLT Stop
.ne
t

VVIT - DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING

Visit : www.EasyEngineering.net
EE6612 MICROPROCESSOR AND MICROCONTROLLER LABORATORY 22

Input:

Memory location Data


9100
9101
9102
9103

ww Output:
w.E
asy
En
Memory location Data

9500

gin
eer
ing
.ne
t
RESULT:
Thus the program to find the largest number in a given array using 8085 microprocessor
was executed.

VVIT - DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING

Visit : www.EasyEngineering.net
EE6612 MICROPROCESSOR AND MICROCONTROLLER LABORATORY 23

Exp No : 6
Date :

SMALLEST NUMBER OF PROGRAM IN A GIVEN ARRAY

AIM:

To write an assembly language program to find the smallest number in a given array
using 8085 microprocessor.

APPARATUS REQUIRED:

Sl.No Name of the Apparatus Qty

ww 1
2
8085 Microprocessor kit
+5Volts Power Supply
1
1
3 w.E Keyboard Connector 1

asy
ALGORITHM:
En
1. Initialize the Memory Pointer.

gin
2. Load the number of array to B register.
3. Move the first data to register A.
eer
4. Increment the Memory pointer.
5. Compare the register A and M . ing
6. If carry jump to loop2.
.ne
7. Move the register M to A.
8. Decrement the register B by one.
9. Check register B is Zero otherwise go to step 4.
t
10. Store the Largest value to memory location.
11. Stop.

VVIT - DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING

Visit : www.EasyEngineering.net
EE6612 MICROPROCESSOR AND MICROCONTROLLER LABORATORY 24

FLOWCHART: (Smallest Number)

START

Initialize the Memory location

Load the counter to register B

Move the first data to register A

Increment the memory location

ww Compare the register A and M

w.E Yes

asy If cy=0?

En No

gin
Move the memory data to register A

Check B=0? eer


No
ing
Yes
.ne
Move the result to memory location
t
STOP

VVIT - DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING

Visit : www.EasyEngineering.net
EE6612 MICROPROCESSOR AND MICROCONTROLLER LABORATORY 25

PROGRAM:

ADDRESS LABEL MNEMONICS OPCODE COMMENTS

8000 LXI H,9100 Initialize the memory pointer


MVI B,04 Load the counter to register B
MOV A,M Move the First Data to A
Register
Loop1 INX H Increment the memory pointer
CMP M Compare register A and M
datas
JC Loop2 If carry jump to loop2

ww Move register M to A
MOV A, M
Loop2 DCR B Decrement B register by one
CMP M Compare register A and M

w.E JNZ Loop1


data’s
Jump if No Zero to loop1

asy
STA 9500
HLT
Store the Result to memory
Stop

Input: En Output:

Memory location Data gin


9100
eer
Memory location Data

ing
9101
9500
9102
9103
.ne
t
RESULT:
Thus the program to find the smallest number in a given array using 8085 microprocessor
was executed.

VVIT - DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING

Visit : www.EasyEngineering.net
EE6612 MICROPROCESSOR AND MICROCONTROLLER LABORATORY 26

Exp No : 7
Date :

PROGRAM SORT ASCENDING OREDR IN A GIVEN ARRAY

AIM:

To write an assembly language program to sort ascending order in a given array using
8085 microprocessor.

APPARATUS REQUIRED:

Sl.No Name of the Apparatus Qty

ww 1 8085 Microprocessor kit 1


2
3 w.E +5Volts Power Supply
Keyboard Connector
1
1

ALGORITHM: asy
En
1. Initialize the Memory Pointer.

gin
2. Load the number of array to B register.
3. Move the first data to register A.
4. Increment the Memory pointer. eer
5. Compare the register A and M . ing
6. If carry jump to loop2.
.ne
7. Move the register M to A.
8. Decrement the register B by one.
9. Check register B is Zero otherwise go to step 4.
t
10. Store the Largest value to memory location.
11. Stop.

VVIT - DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING

Visit : www.EasyEngineering.net
EE6612 MICROPROCESSOR AND MICROCONTROLLER LABORATORY 27

FOWCHART: (Ascending Order)

START

Initialize counter1=09

Initialize memory pointer, Initialize counter2= 09

Get the number

Increment the memory pointer

ww
w.E
No
Is (pointer-1)>(pointer)?

asy
Interchange the content
Yes

En
gin
Decrement counter2 and Increment memory pointer

No No
Is counter2=0?
eer
Yes
ing
Decrement counter 1
.ne
Is counter1=0?
Yes
t
STOP

VVIT - DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING

Visit : www.EasyEngineering.net
EE6612 MICROPROCESSOR AND MICROCONTROLLER LABORATORY 28

PROGRAM:

ADDRESS LABEL MNEMONICS OPCODE COMMENTS

8000 MVI B,09 Load the counter to register B


L3 LXI H,9100 Initialize the memory pointer
MVI C,09 Load the counter value
L2 MOV A,M Move the First Data to A
Register
INX H Increment the memory pointer

ww CMP M Compare register A and M


data’s

w.E JC L1
MOV D, M
MOV M,A
If carry jump to loop1
Move register M to D
Move register M to A

asyDCX H
MOV M,D
Decrement memory pointer
Move register M to D
INX H
En Increment memory pointer
L1 DCR C
JNZ L2
gin Decrement B register by one
Jump if No Zero to loop2
DCR B
JNZ L3 eer Decrement B register by one
Jump if No Zero to loop3
HLT Stop
ing
.ne
t

VVIT - DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING

Visit : www.EasyEngineering.net
EE6612 MICROPROCESSOR AND MICROCONTROLLER LABORATORY 29

Input:

Memory location Data


9100
9101
9102
9103
9104
9105
9106
9107

ww 9108
9109

w.E
Output: asy
En
Memory location
9100
Data
gin
9101
9102 eer
9103
9104 ing
9105
.ne
9106
9107
9108
t
9109

RESULT:

Thus the program of sort the ascending order in given array was executed by
using 8085.

VVIT - DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING

Visit : www.EasyEngineering.net
EE6612 MICROPROCESSOR AND MICROCONTROLLER LABORATORY 30

Exp No : 8
Date :

PROGRAM SORT DESCENDING OREDR IN A GIVEN ARRAY

AIM:

To write an assembly language program to sort descending order in a given array using
8085 microprocessor.

APPARATUS REQUIRED:

Sl.No Name of the Apparatus Qty

ww 1 8085 Microprocessor kit 1


2
3 w.E +5Volts Power Supply
Keyboard Connector
1
1

asy
En
ALGORITHM:

1. Initialize the Memory Pointer.

gin
2. Load the number of array to B register.
3. Move the first data to register A.
eer
4. Increment the Memory pointer.
5. Compare the register A and M . ing
6. If no carry jump to loop2.
.ne
7. Move the register M to A.
8. Decrement the register B by one.
9. Check register B is Zero otherwise go to step 4.
t
10. Store the Largest value to memory location.
11. Stop.

VVIT - DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING

Visit : www.EasyEngineering.net
EE6612 MICROPROCESSOR AND MICROCONTROLLER LABORATORY 31

FLOWCHART: (Descending order)

START

Initialize counter1=09

Initialize memory pointer, Initialize counter2= 09

Get the number

ww
w.E
No
Increment the memory pointer

asy
Is (pointer-1)>(pointer)?
Yes

En
Interchange the content gin
No

Decrement counter2 and Increment memory pointer eer


Yes
ing
Is counter2=0?
.ne
Decrement counter 1

Yes
t
Is counter1=0?

STOP

VVIT - DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING

Visit : www.EasyEngineering.net
EE6612 MICROPROCESSOR AND MICROCONTROLLER LABORATORY 32

PROGRAM:

ADDRESS LABEL MNEMONICS OPCODE COMMENTS

8000 MVI B,04 Load the counter to register B


L3 LXI H,9100 Initialize the memory pointer
MVI C,04 Load the counter value
L2 MOV A,M Move the First Data to A
Register
INX H Increment the memory pointer
CMP M Compare register A and M

ww JNC L1
datas
If carry jump to loop1

w.E MOV D, M
MOV M,A
Move register M to D
Move register M to A

asy
DCX H
MOV M,D
Decrement memory pointer
Move register M to D
INX H
En Increment memory pointer
L1 DCR C
JNZ L2 gin Decrement B register by one
Jump if No Zero to loop2
DCR B
eerDecrement B register by one

ing
JNZ L3 Jump if No Zero to loop3
HLT Stop

.ne
t

VVIT - DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING

Visit : www.EasyEngineering.net
EE6612 MICROPROCESSOR AND MICROCONTROLLER LABORATORY 33

Input:

Memory location Data


9100
9101
9102
9103
9104
9105
9106
9107

ww
9108
9109

Output: w.E
asy
Memory location
En
Data

9100
9101 gin
9102
9103 eer
9104
9105 ing
9106
9107 .ne
9108
9109 t
RESULT:

Thus the program of sort the descending order in given array was executed by using
8085.

VVIT - DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING

Visit : www.EasyEngineering.net
EE6612 MICROPROCESSOR AND MICROCONTROLLER LABORATORY 34

EX.NO:9

Date :

PROGRAM FOR CODE CONVERSION – DECIMAL TO HEX


AIM:
To write an assembly language program to convert a given decimal number into
hexadecimal number using 8085 microprocessor.

APPARATUS REQUIRED:

ww Sl.No
1
Name of the Apparatus
8085 Microprocessor kit
Qty
1
2
3 w.E
+5Volts Power Supply
Keyboard Connector
1
1

asy
ALGORITHM:
En
1. Initialize the Memory Pointer.
2. Increment B register. gin
eer
3. Increment accumulator by one and adjust to decimal every time.
4. Compare the given decimal number with accumulator value.
ing
5. When both matches, the equivalent hexadecimal value is in B register.
6. Store the resultant in memory location.
.ne
t

VVIT - DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING

Visit : www.EasyEngineering.net
EE6612 MICROPROCESSOR AND MICROCONTROLLER LABORATORY 35

FLOWCHART : (DECIMAL TO HEX)

START

Initialize Memory Pointer

Clear the Accumulator and B register

Increment the B register and add register A by one

ww Decimal adjust accumulator

w.E No Is A=M?

asy Yes

En
Store the result to memory Yes

gin
STOP
eer
ing
.ne
t

VVIT - DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING

Visit : www.EasyEngineering.net
EE6612 MICROPROCESSOR AND MICROCONTROLLER LABORATORY 36

PROGRAM:

LABEL MNEMONICS OPCODE COMMENTS


ADDRESS

8000 LXI H,9100 Initialize the memory pointer


MVI A,00 Clear the Accumulator
MVI B,00 Clear the B register
Loop1 INR B Increment the B register
ADI 01 Increment the A register
DAA Decimal Adjust Accumulator
CMP M Compare A and M register

ww JNZ Loop1 Jump if No Zero to loop1

w.E
MOV A,B Move register B to A
STA 9500 Store the result to memory
HLT Stop the program

asy
Input:
En
Memory location Data
gin
9100
eer
Output: ing
.ne
Memory location
9500
Data
t
RESULT:
Thus the program of conversion of decimal to hex given data was executed by using
8085.

VVIT - DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING

Visit : www.EasyEngineering.net
EE6612 MICROPROCESSOR AND MICROCONTROLLER LABORATORY 37

Exp No:10
Date :

PROGRAM FOR CODE CONVERSION – HEXA DECIMAL TO DECIMAL

AIM:
To write an assembly language program to convert a given hexadecimal number into
decimal number using 8085 microprocessor.

APPARATUS REQUIRED:

Sl.No Name of the Apparatus Qty

ww 1 8085 Microprocessor kit 1


2

3
w.E
+5Volts Power Supply

Keyboard Connector
1

asy
ALGORITHM:
En
1. Initialize the Memory Pointer.
2. Increment B register. gin
eer
3. Increment accumulator by one and adjust to decimal every time.
4. Compare the given decimal number with B register value.
ing
5. When both match, the equivalent decimal value is in A register.
6. Store the resultant in memory location. .ne
t

VVIT - DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING

Visit : www.EasyEngineering.net
EE6612 MICROPROCESSOR AND MICROCONTROLLER LABORATORY 38

FLOWCHART : (Decimal To Hex)

START

Initialize Memory Pointer

Clear the Accumulator, Band C register

Increment B register and add register A by one

ww Decimal adjust accumulator

w.E Is Cy=1?

asy No
Yes

En
Increment the register C by one

gin
Transfer A to D and B to A
eer
Is A=M?
ing
No
.ne
Store the Result
Yes
t
STOP

VVIT - DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING

Visit : www.EasyEngineering.net
EE6612 MICROPROCESSOR AND MICROCONTROLLER LABORATORY 39

PROGRAM:

ADDRESS LABEL MNEMONICS OPCODE COMMENTS

8000 LXI H,9100 Initialize the memory pointer


MVI A,00 Clear the Accumulator
MVI B,00 Clear the B register
MVI C,00 Clear the C register
Loop1 INR B Increment the B register
ADI 01 Increment the A register
DAA Decimal Adjust Accumulator
JNC NEXT If no carry go to next loop

ww NEXT
INR
MOV
MOV
C
D,A
A,B
Increment register C by one
Transfer A to D
Transfer B to A

w.E CMP
MOV
M
A,D
Compare A and M register
Transfer D to A

asy
JNZ
STA
Loop1
9500
Jump if No Zero to loop1
Store the result to memory
MOV
STA
A,C
En
9501
Move register B to A
Store the result to memory
HLT
gin Stop the program

Input:
Memory location Data eer
9100
ing
Output:
.ne
Memory location
9500
Data
t
RESULT:

Thus the program of conversion of hexadecimal to decimal given data was executed by
using 8085.

VVIT - DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING

Visit : www.EasyEngineering.net
EE6612 MICROPROCESSOR AND MICROCONTROLLER LABORATORY 40

EX.NO:11

DATE :

PROGRAM FOR CODE CONVERSION – BINARY TO ASCII


AIM:
To write an assembly language program to convert a given binary number into ASCII
number using 8085 microprocessor.

APPARATUS REQUIRED:

wwSl.No
1
Name of the Apparatus
8085 Microprocessor kit
Qty
1
2
3 w.E +5Volts Power Supply
Keyboard Connector
1
1

asy
ALGORITHM:
En
1. Start the program
2. Load the data from address 9100 to A gin
3. Compare register A and data 0Ah(decimal 10).
eer
4. If no carry add 37h with register A.
5. If Carry add 30h with register A. ing
6. Store the result to memory location.
.ne
t

VVIT - DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING

Visit : www.EasyEngineering.net
EE6612 MICROPROCESSOR AND MICROCONTROLLER LABORATORY 41

FLOWCHART : ( Binary to ASCII)

START

Get the data to Accumulator

Compare register A and Data 0Ah

ww No
Is Cy=1?

w.E
Add register A with 07
asy Yes

En
gin
Add register A with 30

Store the result


eer
ing
STOP
.ne
t

VVIT - DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING

Visit : www.EasyEngineering.net
EE6612 MICROPROCESSOR AND MICROCONTROLLER LABORATORY 42

PROGRAM:

ADDRESS LABEL MNEMONICS OPCODE COMMENTS

8000 LDA 9100 Get the data to Accumulator


MVI A,00 Clear the Accumulator
CPI 0A Compare register A and data 10
JC LOOP1 If carry jump to loop1
ADI 07H Add A with 07

ww LOOP1 ADI 30H


STA 9500
Add A with 30
Store the result to memory

w.E HLT Stop the program

asy
Input:
En
Memory location Data
gin
9100
eer
Output: ing
.ne
Memory location

9500
Data
t
RESULT:

Thus the program of conversion of binary to ASCII given data was executed by using
8085.

VVIT - DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING

Visit : www.EasyEngineering.net
EE6612 MICROPROCESSOR AND MICROCONTROLLER LABORATORY 43

Exp No : 12

DATE :

PROGRAM FOR CODE CONVERSION – ASCII TO BINARY


AIM:
To write an assembly language program to convert a given ASCII number into binary
number using 8085 microprocessor.

APPARATUS REQUIRED:

Sl.No Name of the Apparatus Qty

ww 1 8085 Microprocessor kit 1


2
3
w.E+5Volts Power Supply
Keyboard Connector
1
1

asy
ALGORITHM:
En
1. Start the program
2. Load the data from address 9100 to A gin
3. Compare register A and data 3Ah.
eer
4. If no carry subtract 37h with register A.
5. If carry subtract 30h with register A. ing
6. Store the result to memory location.
.ne
t

VVIT - DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING

Visit : www.EasyEngineering.net
EE6612 MICROPROCESSOR AND MICROCONTROLLER LABORATORY 44

FLOWCHART : (ASCII TO BINARY)

START

Get the data to Accumulator

ww Compare register A and Data 3AH

w.E Yes
Is Cy=1?
Yes

asy
Subtract register A with 07
En No

gin
Subtract register A with 30
eer
Store the result ing
.ne
STOP
t

VVIT - DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING

Visit : www.EasyEngineering.net
EE6612 MICROPROCESSOR AND MICROCONTROLLER LABORATORY 45

PROGRAM:

ADDRESS LABEL MNEMONICS OPCODE COMMENTS

8000 LDA 9100 Get the data to Accumulator


MVI A,00 Clear the Accumulator
CPI 3A Compare register A and data
3Ah
JC LOOP1 If carry jump to loop1

ww LOOP1
ADI 07H
ADI 30H
Add A with 07
Add A with 30

w.E STA 9500


HLT
Store the result to memory
Stop the program

asy
Input :
En
Memory location Data
gin
9100
eer
Output: ing
Memory location Data .ne
9500 t
RESULT:

Thus the program of conversion of ASCII to binary given data was executed by using
8085.

VVIT - DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING

Visit : www.EasyEngineering.net
EE6612 MICROPROCESSOR AND MICROCONTROLLER LABORATORY 46

EX.NO:13
DATE :

PROGRAM FOR INTERFACING OF ADC WITH 8085

AIM:

To write an assembly language program to convert an analog signal into a digital signal
using an ADC interfacing with 8085 microprocessor.

APPARATUS REQUIRED:

Sl. No Name of the Apparatus Qty

ww 1
2
8085 Microprocessor kit
+5Volts Power Supply
1
1
3
4
w.EKeyboard Connector
ADC Interfacing kit
1
1
5 Multimeter
asy 1

Working procedure for ADC:


En
gin
 Connect the 5v power supply to trainer kit and adc chord.

eer
 Connect the 26-pin connector from the kit to adc chord.

ing
 Connect the card from keyboard into the socket provided in the kit.
 Switch on the power supply.
 Assemble your program.
.ne
 Vary the pot in the adc chord.
t
 Execute it and view the output count in the register A which will be displayed in
LCD display.
 Repeat the above steps for different inputs in the pots.

VVIT - DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING

Visit : www.EasyEngineering.net
EE6612 MICROPROCESSOR AND MICROCONTROLLER LABORATORY 47

8085 ADDRESS:

8255 control register address – 23H

8255 port A address -20H

8255 port B address -21 H

8255 port C address -22H

ww
w.E
asy
En
gin
eer
ing
.ne
t

VVIT - DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING

Visit : www.EasyEngineering.net
EE6612 MICROPROCESSOR AND MICROCONTROLLER LABORATORY 48

PROGRAM:

ADDRESS LABEL MNEMONICS OPCODE COMMENTS

9000 MVI A,90 Control Word for port A as


input and port c as output
OUT 23 Out in control RE
MVI A,01 Select input for MUX
OUT 21
MVI A,FF
OUT 22 Port C is enable
MVI A,00 Start of Conversion(SOC)

ww OUT 22
MVI A,FF
OUT 22

w.E CALL 9100


IN20
Delay subroutine
End of conversion(EOC)

9100 delay asyRST 1


MVI B,0F
Break point
Delay Count
Loop1
Loop2
En
MVI A,FF
NOP
Load data FF to register A
No operation
NOP
DCR A gin No operation
Decrement register A
JNZ loop2
DCR B eer If no zero jump to loop2
Decrement register B by one
JNZ loop1
RET ing
If no zero jump to loop1
Return to main Program

.ne
Analog Input Digital output
t

RESULT :
Thus the conversion of a analog signal into and digital signal was executed using
interfacing of ADC with 8085.

VVIT - DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING

Visit : www.EasyEngineering.net
EE6612 MICROPROCESSOR AND MICROCONTROLLER LABORATORY 49

EX.NO:14
DATE :

PROGRAM FOR INTERFACING OF DAC WITH 8085

AIM:
To write an assembly language program to convert a digital signal into a analog signal
using an DAC interfacing with 8085 microprocessor.

APPARATUS REQUIRED:

Sl.No Name of the Apparatus Qty


1 8085 Microprocessor kit 1

ww 2 +5Volts Power Supply 1


3
4 w.E
Keyboard Connector
DAC Interfacing kit
1
1
5 CRO
asy 1

Working procedure for DAC:


En
gin
 Connect the 5v power supply to trainer kit and dac(0800) chord.
 Connect the 26-pin connector from the kit to dac(0800) chord.

eer
 Connect the card from keyboard into the socket provided in the kit.
 Switch on the power supply.
ing
 Assemble your program.Give the digital data in the software program itself.

.ne
 Execute it and view the output count in the register A which will be displayed in
CRO
 Repeat the above steps for different digital inputs. t
i)SQUARE WAVE FORM
ALGORITHM:

1. Load the initial value (00) to Accumulator and move it to DAC.


2. Call the delay program
3. Load the final value (FF) to accumulator and move it to DAC.
4. Call the delay program.
5. Repeat steps 2 to 5.
6. Execute the program and using a CRO, verify that the waveform at the DAC2 output is a square-wave.
Modify the frequency of the square-wave, by varying the time delay.
VVIT - DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING

Visit : www.EasyEngineering.net
EE6612 MICROPROCESSOR AND MICROCONTROLLER LABORATORY 50

8085 ADDRESS:

8255 control register address – 23H

8255 port A address -20H

8255 port B address -21 H

8255 port C address -22H

ww
w.E
asy
En
gin
eer
ing
.ne
t

VVIT - DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING

Visit : www.EasyEngineering.net
EE6612 MICROPROCESSOR AND MICROCONTROLLER LABORATORY 51

PROGRAM: SQUARE WAVE FORM

ADDRESS LABEL MNEMONICS OPCODE COMMENTS

9000 MVI A,80 Control Word


OUT 23 Out in control REG
LOOP1 MVI A,FF High Input
OUT 21 output in port B
CALL 9100 Delay subroutine
MVI A,00 Low Input

ww OUT 21
CALL 9100
output in port B
Delay subroutine

w.E JMP
LOOP1(9004)
Jump To Start

9100 delay
asy Delay Count
MVI C,FF
Loop1 MVI B,FF Load data FF to register A
Loop2 NOP
NOP
En No operation
No operation
DCR B
JNZ loop2 gin Decrement register B
If no zero jump to loop2
DCR C
JNZ loop1 eer Decrement register C by one
If no zero jump to loop1
RET
ing
Return to main Program

.ne
t

VVIT - DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING

Visit : www.EasyEngineering.net
EE6612 MICROPROCESSOR AND MICROCONTROLLER LABORATORY 52

SQUARE WAVE FORMS ;

ww time

w.E
asy
En
gin
eer
ing
.ne
t

VVIT - DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING

Visit : www.EasyEngineering.net
EE6612 MICROPROCESSOR AND MICROCONTROLLER LABORATORY 53

II) SAW TOOTH GENERATION:

ALGORITHM:
1. Load the initial value (00) to Accumulator
2. Move the accumulator content to DAC.
3. Increment the accumulator content by 1.
4. Repeat steps 3 and 4.

ww
5. Output digital data from 00 to FF constant steps of 01 to DAC1 repeat this sequence
again and again. As a result a saw – tooth wave will be generated at DAC1 output.

w.E
PROGRAM: SAW TOOTH WAVE FORM
asy
En
ADDRESS LABEL MNEMONICS
ginOPCODE COMMENTS

9000 MVI A,80


eer Control Word
OUT 23
ing
Out in control REG

.ne
START MVI A,00 Low Input
LOOP1 OUT 21 output in port B
INR A
JNZ LOOP1
t
Increment register A by one
If zero jump to loop1
JMP START Jump To Start

VVIT - DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING

Visit : www.EasyEngineering.net
EE6612 MICROPROCESSOR AND MICROCONTROLLER LABORATORY 54

ww
w.E
SAW TOOTH WAVE FORM :

V asy
En
gin time

eer
ing
.ne
t

VVIT - DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING

Visit : www.EasyEngineering.net
EE6612 MICROPROCESSOR AND MICROCONTROLLER LABORATORY 55

(iii) TRIANGULAR WAVE GENERATION:


ALGORITHMS:
1. Load the initial value (00) to Accumulator.
2. Move the accumulator content to DAC
3. Increment the accumulator content by 1.
4. If accumulator content is zero proceed to next step. Else go to step 3.
5. Load value (FF) to accumulator.
6. Move the accumulator content to DAC.

ww 7. Decrement the accumulator content by 1.


8. If accumulator content is zero go to step 2. Else go to step 2.

w.E
PROGRAM: TRIANGULAR WAVE FORM

ADDRESS LABEL asy MNEMONICS OPCODE COMMENTS

9000 START En
MVI L,00 Transfer 00 to register L
LOOP1 MOV A,L
gin Transfer L to A
OUT 21
INR L
eer Output in control register
Increment register L
JNZ LOOP1
MVI L,FF ing
If no zero jump to loop1
Transfer FF to register L
LOOP2 MOVA,L
OUT 21
Transfer L to A
.ne
Output in control register
DCR L
JNZ LOOP2
JMP START
Decrement register L
t
If no zero jump to loop2
Jump to start loop
TRIANGULAR WAVE FORM :

time

RESULT :

Thus the conversion of a digital signal into an analog signal was executed using
interfacing of DAC with 8085.
VVIT - DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING

Visit : www.EasyEngineering.net
EE6612 MICROPROCESSOR AND MICROCONTROLLER LABORATORY 56

EXP.No :15

DATE :

PROGRAM FOR KEYBOARD AND DISPLAY INTERFACING WITH 8085


AIM:

To interface 8279 Programmable Keyboard Display Controller with 8085


Microprocessor.

APPARATUS REQUIRED:

ww Sl.No Name of the Apparatus Qty


1
2
w.E8085 Microprocessor kit
+5Volts Power Supply
1
1
3
asy
Keyboard Connector 1
4
En
Keyboard and Display Interfacing kit 1

PROGRAM: 7 SEGMENT DISPLAY gin


eer
ADDRESS LABEL MNEMONICS OPCODE
ing
COMMENTS

9000
9002
MVI
MVI
C,BA
A,12 control word .ne
7 segment code for 2

9004
9006
9008
OUT
MVI
OUT
71
A,3E
71
Control port
Frequency division
Control register
t
900A MVI A,A0 Display / write inhibit
900C OUT 71 Control register
900E MVI B,08
9010 MVI A,00 Clear display
9012 OUT 70
9014 DCR B
9015 JNZ 9012
9018 MOV A,C Take the character to display
9019 OUT 70
901B JMP 9019

VVIT - DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING

Visit : www.EasyEngineering.net
EE6612 MICROPROCESSOR AND MICROCONTROLLER LABORATORY 57

f g b

e c

Char D C B A E F G H HEX CODE


0
1
ww 1
0
1
1
1
1
1
0
1
0
1
0
0
0
0
0
FC
60

w.E
asy
En
gin
eer
ing
.ne
t
RESULT:

Thus 8279 controller was interfaced with 8085 and program for rolling display was
executed successfully.

VVIT - DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING

Visit : www.EasyEngineering.net
EE6612 MICROPROCESSOR AND MICROCONTROLLER LABORATORY 58

EXP.No: 16

DATE :

PROGRAM FOR INTERFACING - TRAFFIC LIGHT CONTROLLER


WITH 8085
AIM:

To write an assembly language program to simulate the traffic light at an intersection


using a traffic light interface with 8085 microprocessor.

ww
APPARATUS REQUIRED:

Sl.No
1 w.E Name of the Apparatus
8085 Microprocessor kit
Qty
1
2
3 asy
+5Volts Power Supply
Keyboard Connector
1
1
4
En
Traffic Light control Interfacing kit 1

WORKING PROCEDURE: gin


 Connect the 5V supply to trainer kit. eer
 Connect the 26 pin FRC from the kit.
 Switch on the power supply. ing
 Assemble the program.
.ne
 Execute it and output display by LED.

8085 ADDRESS:
t
PORT ADDRESS
CWR 23
PORT A 20
PORT B 21
PORT C 22

VVIT - DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING

Visit : www.EasyEngineering.net
EE6612 MICROPROCESSOR AND MICROCONTROLLER LABORATORY 59

PROGRAM: TRAFFIC LIGHT CONTROLLER

ADDRESS LABEL MNEMONICS OPCODE COMMENTS

8500 MVI A,80 All port as output


8502 Out 23
For starting right turn in N-S sides & pedestrian stopping
8504 MVI A,0F For pedestrian
8506 Out 21 Signal

ww 8508
850A
850C
MVI A,4D
OUT 20
CALL
For green LEDs in N-S
Direction
Sequence Delay

850F w.E DELAY(8569)


CALL Amber delay

asy
AMBER(855F)
For stopping vehicles in N-S direction & starting E-W direction
8512 MVI A,8B For stopping N-S sides
8514
8516
OUT 20
En
CALL DELAY
For starting E-W sides
Sequence Delay
8519 CALL AMBER
gin Amber delay
For starting right turn in N-S sides & stopping E-W sides
851C
851E
MVI A,49
OUT 20 eer For free left in all sides
For stopping E-W sides
8520
8522
MVI A,01
OUT 22 ing
For right turn in N-S sides

8524
8527
CALL DELAY
MVI A,07 .ne
8529
852B
OUT 22
CALL AMBER
Stopping Right Turn In N-S Sides & Starting Turn In E-W Sides
t
852E MVI A,89
8530 OUT 20
8532 MVI A,02
8534 OUT 22
8536 CALL DELAY
8539 MVI A,00
853B OUT 22
853D MVI A,30
853F OUT 20
8541 MVI C,04
8543 CALL DELAY
For starting Pedestrian
VVIT - DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING

Visit : www.EasyEngineering.net
EE6612 MICROPROCESSOR AND MICROCONTROLLER LABORATORY 60

8546 MVI A,C0


8548 OUT 20
854A MVI A,F0
854C OUT 21
854E MVI C,10
8550 CALL DELAYSUB
8553 MVI A,30
8555 OUT 20
8257 MVI C,08
8259 CALL DELAYSUB
825C JMP CONTINUE

ww 855F
8561
AMBER MVI A,39
OUT 20
8563
8568
w.E MVI C,08
CALL DELAYSUB
8568
asyRET
8569 DELAY MVI C,40
En
856B
856E
CALL DELAYSUB
RET gin
856F DELAYSUB
eer
BACK2
BACK1
MVI D,FF
MVI A,FF ing
BACK NOP
.ne
DCR A
JNZ BACK t
DCR D
JNZ BACK1
MOV A,C
JZ OUT
DCR C
JNZ BACK2
OUT RET

VVIT - DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING

Visit : www.EasyEngineering.net
EE6612 MICROPROCESSOR AND MICROCONTROLLER LABORATORY 61

ww
w.E
asy
En
gin
eer
ing
.ne
t
RESULT:
Thus an assembly language program to simulate the traffic light at an intersection
using a traffic light was written and implemented.

VVIT - DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING

Visit : www.EasyEngineering.net
EE6612 MICROPROCESSOR AND MICROCONTROLLER LABORATORY 62

EXP.No : 17

DATE:

PROGRAM FOR I/O PORT SERAIL COMMUNICATION WITH 8085


AIM:
To write a program to initiate 8251 and to check the transmission and reception of
character.

APPARATUS REQUIRED:

Sl.No Name of the Apparatus Qty

ww 1
2
8085 Microprocessor kit
+5Volts Power Supply
1
1
3
4
w.E
Keyboard Connector
8251/8253 Interfacing kit
1
1

asy
ALGORITHM:
En
1. Initialize timer (8253) IC
2. Move the Mode command word (36H) to A reg.gin
3. Output it port address CE
eer
4. Move the command instruction word (37H) to A reg.
5. Output it to port address C8 ing
PROGRAM: SQUARE WAVE GENERATION
.ne
ADDRESS LABEL MNEMONICS OPCODE COMMENTS t
9000 MVI A,36 Channel 0 in mode 3
OUT CE Send mode control word
MVI A,0A LSB of count
OUT C8 Write count to register
MVI A,00 MSB of count
OUT C8 Write count to register
HLT Stop the program

VVIT - DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING

Visit : www.EasyEngineering.net
EE6612 MICROPROCESSOR AND MICROCONTROLLER LABORATORY 63

time

ww
w.E
asy
En
gin
eer
ing
.ne
t
RESULT:

Thus the program to initiate 8251 was written and executed.

VVIT - DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING

Visit : www.EasyEngineering.net
EE6612 MICROPROCESSOR AND MICROCONTROLLER LABORATORY 64

Exp No : 18
Date :

PROGRAM FOR 8 BIT ADDITION USING 8051

AIM:
To write an assembly language program for addition of two 8 bit data using 8051
microcontroller.

APPARATUS REQUIRED:

Sl.No Name of the Apparatus Qty


1 8051 Microcontroller kit 1

ww 2 +5Volts Power Supply 1

ALGORITHM:
3
w.E
Keyboard Connector 1

asy
1. Clear the register “C”

En
2. Initialize the memory pointer to data location.

gin
3. Get the first Data from memory Location and move to register “A”.
4. Get the second data from memory location.
5. Add first and second data.
eer
6. If carry the increment the register ‘C’ by one.
7. Store the result to memory location. ing
.ne
t

VVIT - DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING

Visit : www.EasyEngineering.net
EE6612 MICROPROCESSOR AND MICROCONTROLLER LABORATORY 65

FLOW CHART: (8 bit Addition)

START

Clear the “Cy” Flag and R0 register

ww Initialize Memory Location and get the first data from memory

w.E
ge Get the Second data from memory

asy
ge
En
Add the first and Second data’s

gin
ge If
carry=1? eer
NO

ing
Yes

Increment “R0” register by One .ne


Store the Result to Memory Location
t
ge

ge STOP

VVIT - DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING

Visit : www.EasyEngineering.net
EE6612 MICROPROCESSOR AND MICROCONTROLLER LABORATORY 66

PROGRAM:

OP
ADDRESS LABEL MNEMONICS COMMENTS
CODE
8000 CLR C Clear the “Carry” Flag
MOV R0,#00
MOV DPTR,#9200 Initialize the memory pointer
MOVX A,@DPTR Move the First Data to A Reg
MOV B,A Transfer Data To B

ww INC DPTR
MOVX A,@DPTR
Increment the memory pointer
Get the second data from

w.E ADD A,B


JNC Loop1
memory
Add First and Second Data
Jump if No Carry to loop1

asyINR R0 Increment the “C” register by


one
Loop1
En
MOV DPTR,#9500
MOVX @DPTR,A
Initialize the memory pointer
Store The Result
MOV A,R0
gin Move the Carry result to Reg
“A”
INC DPTR
MOVX @DPTR,A
eer Increment the memory pointer
Store the Carry Result
HLT SJMP : HLT
ing
Stop the program

Input:
.ne
Memory location
9200
9201
Data
t
Output:

Memory location Data


9500
9501
RESULT :
Thus the addition of two numbers was performed using the 8085 microprocessor .

VVIT - DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING

Visit : www.EasyEngineering.net
EE6612 MICROPROCESSOR AND MICROCONTROLLER LABORATORY 67

Exp No : 19
Date :

PROGRAM FOR 8 BIT SUBTRACTION USING 8051

AIM:
To write an assembly language program for subtraction of two 8 bit data using 8051
microcontroller.

APPARATUS REQUIRED:

Sl.No Name of the Apparatus Qty


1 8051 Microcontroller kit 1

ww 2 +5Volts Power Supply 1

ALGORITHM:
3
w.E
Keyboard Connector 1

asy
1. Initialize the memory pointer to data location.

En
2. Get the first Data from memory and move to register A.
3. Get the second data from memory location.
4. Subtract the first and second data. gin
5. Store the result to memory location.
eer
ing
.ne
t

VVIT - DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING

Visit : www.EasyEngineering.net
EE6612 MICROPROCESSOR AND MICROCONTROLLER LABORATORY 68

FLOW CHART: (8 bit Subtraction)

START

Initialize Memory Location and get the first data from memory

ge Get the Second data from memory location

ww
w.E
ge Subtract the first and Second data’s

ge
asy
En
Store the Result to Memory Location

gin
ge STOP
eer
ing
.ne
t

VVIT - DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING

Visit : www.EasyEngineering.net
EE6612 MICROPROCESSOR AND MICROCONTROLLER LABORATORY 69

PROGRAM:

ADDRESS LABEL MNEMONICS OPCODE COMMENTS

8000 MOV DPTR,#9200 Initialize the memory


pointer
MOVX A,@DPTR Move the First Data to A
Reg
MOV B,A Transfer Data To B
INC DPTR Increment the memory
pointer
MOVX A,@DPTR Get the second data from

ww SUBB A,B
MOV DPTR,#9500
memory
Add First and Second Data
Initialize the memory

w.E MOVX @DPTR,A


pointer
Store The Result

Input:
HLT
asy SJMP : HLT Stop the program

En
Memory location Data
gin
9200
eer
ing
9201

Output:
.ne
Memory location Data t
9500

RESULT :
Thus the subtraction of two numbers was performed using the 8085 microprocessor.

VVIT - DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING

Visit : www.EasyEngineering.net
EE6612 MICROPROCESSOR AND MICROCONTROLLER LABORATORY 70

Exp No : 20
Date :

PROGRAM FOR 8 BIT MULTIPLICATION USING 8051

AIM:
To write an assembly language program for multiplication of two 8 bit data using 8051
microcontroller.

APPARATUS REQUIRED:

Sl.No Name of the Apparatus Qty

ww 1 8051 Microcontroller kit 1

w.E
2 +5Volts Power Supply 1
3 Keyboard Connector 1

ALGORITHM:
asy
En
1. Initialize the memory pointer to data location.

gin
2. Get the first Data from memory and move to register A.
3. Get the second data from memory location.
4. Multiply the first and second data.
eer
5. Store the result to memory location.
ing
.ne
t

VVIT - DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING

Visit : www.EasyEngineering.net
EE6612 MICROPROCESSOR AND MICROCONTROLLER LABORATORY 71

FLOW CHART: ( 8 bit Multiplication)

START

Initialize Memory Location and get the first data from memory

ww ge Get the Second data from memory

w.E
ge
asy
Multiply first and second data

ge En
Initialize the output memory location

gin
ge Store the Result to Memory Location
eer
ing
ge STOP
.ne
t

VVIT - DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING

Visit : www.EasyEngineering.net
EE6612 MICROPROCESSOR AND MICROCONTROLLER LABORATORY 72

PROGRAM:

ADDRESS LABEL MNEMONICS OPCODE COMMENTS

8000 MOV DPTR,#9200 Initialize the memory pointer


MOVX A,@DPTR Move the First Data to A
Register
MOV B,A Transfer Data To B
INC DPTR Increment the memory

ww MOVX A,@DPTR
pointer
Get the second data from
memory

w.E MUL AB Multiply First and Second


Data

asy
MOV DPTR,#9500
MOVX @DPTR,A
Initialize the memory pointer
Store The LSB Result
INC DPTR
En Increment the data pointer
MOV B,A
MOVX @DPTR,A gin Transfer B to A
Store the MSB result
HLT SJMP : HLT
eerStop the program

Input: ing
Memory location Data .ne
9200
9201 t
Output:

Memory location Data


9500
9501

RESULT:
Thus the multiplication of two numbers was performed using the 8085 microprocessor.

VVIT - DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING

Visit : www.EasyEngineering.net
EE6612 MICROPROCESSOR AND MICROCONTROLLER LABORATORY 73

Exp No : 21
Date :
PROGRAM FOR 8 BIT DIVISION USING 8051

AIM:
To write an assembly language program for division of two 8 bit data using 8051
microcontroller.

APPARATUS REQUIRED:

Sl.No Name of the Apparatus Qty


1 8051 Microcontroller kit 1

ww
2 +5Volts Power Supply 1
3 Keyboard Connector 1

ALGORITHM:
w.E
asy
1. Initialize the memory pointer to data location.
2. Get the first Data from memory and move to register A.

En
3. Get the second data from memory location.
4. Divide the first and second data.
5. Store the result to memory location. gin
eer
ing
.ne
t

VVIT - DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING

Visit : www.EasyEngineering.net
EE6612 MICROPROCESSOR AND MICROCONTROLLER LABORATORY 74

FLOW CHART: (8 bit Division)

START

Initialize Memory Location and get the first data from memory

ww
w.E
ge Get the Second data from memory

ge asyDivide first and second data

En
Initialize the output memory location
ge
gin
ge Store the Result to Memory Location eer
ing
ge STOP .ne
t

VVIT - DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING

Visit : www.EasyEngineering.net
EE6612 MICROPROCESSOR AND MICROCONTROLLER LABORATORY 75

PROGRAM:

ADDRESS LABEL MNEMONICS OPCODE COMMENTS

8000 MOV DPTR,#9200 Initialize the memory pointer


MOVX A,@DPTR Move the First Data to A Reg
MOV B,A Transfer Data To B
INC DPTR Increment the memory
pointer
MOVX A,@DPTR Get the second data from
memory
DIV AB Multiply First and Second

ww MOV DPTR,#9500
MOVX @DPTR,A
Data
Initialize the memory pointer
Store The Remainder Result

w.E INC DPTR


MOV B,A
Increment the data pointer
Transfer B to A

HLT asy
MOVX @DPTR,A
SJMP : HLT
Store the Quotient result
Stop the program

Input: En
Memory location Data gin
9200
eer
9201
ing
Output:
.ne
Memory location
9500
Data t
9501

Result:
Thus the division of two numbers was performed using the 8085 microprocessor.

VVIT - DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING

Visit : www.EasyEngineering.net
EE6612 MICROPROCESSOR AND MICROCONTROLLER LABORATORY 76

EX.NO:22
DATE :

PROGRAM FOR INTERFACING OF ADC WITH 8051

AIM:
To write an assembly language program to convert an analog signal into a digital signal
using an ADC interfacing with 8051 microcontroller.

APPARATUS REQUIRED:

Sl. No Name of the Apparatus Qty

ww 1
2
8051 Microcontroller kit
+5Volts Power Supply
1
1

w.E
3 Keyboard Connector 1
4 ADC Interfacing kit 1
5 Multi-meter 1

Working procedure for ADC: asy


En
 Connect the 5v power supply to trainer kit and adc chord.

gin
 Connect the 26-pin connector from the kit to adc chord.

eer
 Connect the card from keyboard into the socket provided in the kit.
 Switch on the power supply.
 Assemble your program.
ing
 Vary the pot in the adc chord.
.ne
 Execute it and view the output count in the register A which will be displayed in
LCD display.
 Repeat the above steps for different inputs in the pots.
t

VVIT - DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING

Visit : www.EasyEngineering.net
EE6612 MICROPROCESSOR AND MICROCONTROLLER LABORATORY 77

8085 ADDRESS:

8255 control register address – 6003H

8255 port A address -6000H

8255 port B address -6001 H

8255 port C address -6002H

ww
w.E
asy
En
gin
eer
ing
.ne
t

VVIT - DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING

Visit : www.EasyEngineering.net
EE6612 MICROPROCESSOR AND MICROCONTROLLER LABORATORY 78

PROGRAM:

ADDRESS LABEL MNEMONICS OPCODE COMMENTS

9000 MOV DPRT,#6003 Control Word for port A as


input and port c as output
MOV A,#90
MOVX @DPTR,A
MOV DPTR,#6002
MOV A,#FF SOC(start of conversion)
MOVX @DPTR,A

ww MOV DPRT,#6002
MOV A,#00

w.E MOVX @DPTR,A


MOV DPTR,#6002
MOV A,#FF

asy MOVX @DPTR,A


LCALL DELAY

En
MOV DPTR,#6000
MOV A,#FF
MOVX @DPTR,A
LCALL 00BB gin
DELAY
LOOP
MOV R1,#FF
NOP eer
NOP
DJNZ R1,LOOP ing
RET
.ne
Return to main Program

Analog Input Digital output t

RESULT:
Thus the conversion of a analog signal into and digital signal was executed using
interfacing of ADC with 8051.

VVIT - DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING

Visit : www.EasyEngineering.net
EE6612 MICROPROCESSOR AND MICROCONTROLLER LABORATORY 79

EX.NO:23
DATE :

PROGRAM FOR INTERFACING OF DAC WITH 8051

AIM:

To write an assembly language program to convert an digital signal into a analog signal
using an DAC interfacing with 8051 microcontroller.

APPARATUS REQUIRED:

Sl.No Name of the Apparatus Qty

ww 1
2
8051 Microcontroller kit
+5Volts Power Supply
1
1
3
4
5
w.E
Keyboard Connector
DAC Interfacing kit
CRO
1
1
1

Working procedure for DAC: asy


En
 Connect the 5v power supply to trainer kit and dac(0800) chord.

 gin
Connect the 26-pin connector from the kit to dac(0800) chord.
Connect the card from keyboard into the socket provided in the kit.
 Switch on the power supply.
eer


Assemble your program.
Give the digital data in the software program itself. ing

.ne
Execute it and view the output count in the register A which will be displayed in CRO
 Repeat the above steps for different digital inputs.
i)SQUARE WAVE FORM
ALGORITHM:
t
1. Load the initial value (00) to Accumulator and move it to DAC.
2. Call the delay program
3. Load the final value (FF) to accumulator and move it to DAC.
4. Call the delay program.
5. Repeat steps 2 to 5.
6. Execute the program and using a CRO, verify that the waveform at the DAC2 output
is a square-wave. Modify the frequency of the square-wave, by varying the time delay.

VVIT - DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING

Visit : www.EasyEngineering.net
EE6612 MICROPROCESSOR AND MICROCONTROLLER LABORATORY 80

8085 ADDRESS:

8255 control register address – 6003H

8255 port A address -6000H

8255 port B address -6001 H

8255 port C address -6002H

ww
w.E
asy
En
gin
eer
ing
.ne
t

VVIT - DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING

Visit : www.EasyEngineering.net
EE6612 MICROPROCESSOR AND MICROCONTROLLER LABORATORY 81

PROGRAM: SQUARE WAVE FORM

ADDRESS LABEL MNEMONICS OPCODE COMMENTS

8000 LOOP1 MOV P1,#00 Low Input


LCALL DELAY Call Delay
MOV P1,#99 High Input
LCALL DELAY Call Delay
SJMP START Jump To Start
DELAY MOV R0,#FF

ww RPT DJNZ R0,RPT


RET Return to main Program

w.E
asy
V
En
gin
time
eer
ing
.ne
t

VVIT - DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING

Visit : www.EasyEngineering.net
EE6612 MICROPROCESSOR AND MICROCONTROLLER LABORATORY 82

II) SAW TOOTH GENERATION:

ALGORITHM:

1. Load the initial value (00) to Accumulator


2. Move the accumulator content to DAC.
3. Increment the accumulator content by 1.
4. Repeat steps 3 and 4.
5. Output digital data from 00 to FF constant steps of 01 to DAC1 repeat this sequence
again and again. As a result a saw – tooth wave will be generated at DAC1 output.

ww
PROGRAM: SAW TOOTH WAVE FORM

w.E
ADDRESS LABEL MNEMONICS OPCODE COMMENTS

9000 LOOP asy


MOV P1,R1

En
LCALL DELAY
INC R1
SJMP LOOP gin
DELAY MOV R0,#FF
eer
RPT DJNZ,R0,RPT
ing
RET
.ne
V t
time

RESULT :
Thus the conversion of a digital signal into an analog signal was executed using
interfacing of DAC with 8051.

VVIT - DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING

Visit : www.EasyEngineering.net
EE6612 MICROPROCESSOR AND MICROCONTROLLER LABORATORY 83

EX.NO:24
DATE :

PROGRAM FOR INTERFACING STEPPER MOTOR USING 8051


MICROCONTROLLER
AIM:
To interface a stepper motor with 8051 microcontroller and operate it.

THEORY:

A motor in which the rotor is able to assume only discrete stationary angular position is a
stepper motor. The rotary motion occurs in a step-wise manner from one equilibrium position to

ww
the next. Stepper Motors are used very wisely in position control systems like printers, disk
drives, process control machine tools, etc.

w.E
The basic two-phase stepper motor consists of two pairs of stator poles. Each of the four
poles has its own winding. The excitation of any one winding generates a North Pole. A South

asy
Pole gets induced at the diametrically opposite side. The rotor magnetic system has two end
faces. It is a permanent magnet with one face as South Pole and the other as North Pole.
The Stepper Motor windings A1, A2, B1, B2 are cyclically excited with a DC current to

En
run the motor in clockwise direction. By reversing the phase sequence as A1, B2, A2, B1,
anticlockwise stepping can be obtained.
gin
2-PHASE SWITCHING SCHEME:
eer
In this scheme, any two adjacent stator windings are energized. The switching scheme is
shown in the table given below. This scheme produces more torque.
ing
A1 A2 B1 B2 HEX
CLOCK
WISE
.ne
ANTI
CLOCKWISE

1
0
0
1
0
0
1
1
09
05
t
0 1 1 0 06
1 0 1 0 0A

PROCEDURE:
1. Enter the above program starting from location 4100.and execute the same.
2. The stepper motor rotates.
3. Varying the count at R4 and R5 can vary the speed.
4. Entering the data in the look-up TABLE in the reverse order can vary direction of rotation.

VVIT - DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING

Visit : www.EasyEngineering.net
EE6612 MICROPROCESSOR AND MICROCONTROLLER LABORATORY 84

PROGRAM:

ADDRESS LABEL MNEMONICS OPCODE COMMENTS

8000 START MOV Initialize the memory pointer


DPTR,#TABLE
MOV R0,#04 Load the counter
LOOP1 MOVX A,@DPTR Move the First Data to A Reg

ww PUSH DPH
PUSH DPL
Transfer DPH to SP
Transfer DPL to SP

w.E Initialize the port address


MOV
DPTR,#0FFCO
MOVX @DPTR,A Send the value to port address

D1 asy
MOV R4,#0FF
MOV R5,#0FF
Delay subroutine

D2 DJNZ R5,D2
DJNZ R4,D1 En
POP DPL
gin
eer
POP DPH
INC DPTR Next data
SJMP : START
LOOKUP 09,06,05,0A Data’sing
Stop the program

.ne
t

RESULT:
Thus a stepper motor was interfaced with 8051 and run in forward and reverse directions
at various speeds.

VVIT - DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING

Visit : www.EasyEngineering.net
EE6612 MICROPROCESSOR AND MICROCONTROLLER LABORATORY 85

ww
w.E
asy
En
gin
eer
ing
.ne
t

VVIT - DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING

Visit : www.EasyEngineering.net

You might also like