You are on page 1of 4

DEPARTMENT OF ELECTRONICS ENGINEERING

Experiment No. 5

Semester
Subject
Subject Professor
In-charge
Assisting Teachers
Laboratory

T.E. Semester V Electronics Engineering.


Microcontrollers and Applications.
Prof. Manoj Suryawanshi

Student Name
Roll Number
Grade and Subject
Teachers Signature

Akshay Barge
14103c2027

Experiment Number
Experiment Title

5.
8051 Assembly Language Programming and Interfacing DC Motor and its Contro
(Proteus Simulation + TK base implementation).
Hardware:
Software:
IBM PC Compatible Computer System
Kiel ,Flash Magic and Proteous
and TK-Base 89C51RD2 kit

Resources /
Apparatus Required

Objectives
(Skill Set / Knowledge
Tested / Imparted)
Theory of Operation

Prof.Supriya Mangalpalli.
L516 Microprocessor and Microcontroller Lab.

Knowledge of Assembly Language Programming of 8086.


To gain work expertise in Development tools and Life Cycle and instruction set of
8051.
When we talk about controlling the robot, the first thing comes into the mind is

controlling DC motors. Interfacing DC motor to the microcontroller is very importan

concept in Robotic applications. By interfacing DC motor to the microcontroller, we

can do many things like controlling the direction of the motor, controlling the speed
of the motor.

DEPARTMENT OF ELECTRONICS ENGINEERING


Semester
Subject

T.E. Semester V Electronics Engineering


Microcontrollers and Applications

Experiment No. 5

Algorithm :
1.
2.
3.
4.
5.
6.
7.
8.
9.

Flow chart :

Start.
Set 0th pin of port 2.
Clear 1st pin of port 2.
Call delay subroutine.
Clear 0th pin of port 2.
Set 1st pin of port 2.
Call delay subroutine.
Jump to step number 2.
End.
Start
Set P2.0

Clear P2.1

Call delay subroutine

Clear P2.0

Set P Call delay subroutine

DEPARTMENT OF ELECTRONICS ENGINEERING Experiment No. 5


Semester
Subject

T.E. Semester V Electronics Engineering


Microcontrollers and Applications

Coding Sheet: For writing 8051 Programs in Assembly Language


Label/Symbol Assembly Language Code
Comments
(Mnemonics)

UP:

DELAY:
CC:
BB:
AA:

ORG 0000 H
SETB P2.0
CLR P2.1
ACALL DELAY
CLR P2.0
SETB P2.1
ACALL DELAY
SJMP UP
MOV R3, #50 H
MOV R4, #50 H
MOV R5, #50 H
DJNZ R5, AA
DJNZ R4, BB
DJNZ R3, CC
RET
END

Start program from 0000 H


Set P2.0
Clear P2.1
Call delay
Clear P2.0
Set P2.1
Call delay
Jump to UP
R3 = 50 H
R4 = 50 H
R5 = 50 H
R5=R5-1; if R50, jump to AA
R4=R4-1; if R40, jump to BB
R3=R3-1; if R30, jump to CC
Return from sub-routine
End

DEPARTMENT OF ELECTRONICS ENGINEERING Experiment No. 5


Semester
T.E. Semester V Electronics Engineering
Subject
Microcontrollers and Applications

Output:

Conclusion:
Thus studied the assembly language programming and interfacing DC Motor and its
Control to port of micro controller.

You might also like