mca 5

6
DEPARTMENT OF ELECTRONICS ENGINEERING Experiment No. 5 Semester T.E. Semester V – Electronics Engineering. Subject Microcontrollers and Applications. Subject Professor In- charge Prof. Manoj Suryawanshi Assisting Teachers Prof.Supriya Mangalpalli. Laboratory L516– Microprocessor and Microcontroller Lab. Student Name Akshay Barge Roll Number 14103c2027 Grade and Subject Teacher’s Signature Experiment Number 5. Experiment Title 8051 Assembly Language Programming and Interfacing – DC Motor and its Control (Proteus Simulation + TK base implementation). Resources / Apparatus Required Hardware: IBM PC Compatible Computer System and TK- Base 89C51RD2 kit Software: Kiel ,Flash Magic and Proteous Objectives (Skill Set / Knowledge Tested / Knowledge of Assembly Language Programming of 8086. To gain work expertise in Development tools and Life Cycle and instruction set of 8051.

Upload: shreyas-khanore

Post on 14-Dec-2015

4 views

Category:

Documents


1 download

DESCRIPTION

MCA

TRANSCRIPT

Page 1: MCA 5

DEPARTMENT OF ELECTRONICS ENGINEERING Experiment No. 5Semester T.E. Semester V – Electronics Engineering.

Subject Microcontrollers and Applications.

Subject Professor In-charge

Prof. Manoj Suryawanshi

Assisting Teachers Prof.Supriya Mangalpalli.

Laboratory L516– Microprocessor and Microcontroller Lab.

Student Name Akshay Barge

Roll Number 14103c2027

Grade and Subject Teacher’s Signature

Experiment Number

5.

Experiment Title 8051 Assembly Language Programming and Interfacing – DC Motor and its Control (Proteus Simulation + TK base implementation).

Resources / Apparatus Required

Hardware:

IBM PC Compatible Computer System and TK-Base 89C51RD2 kit

Software:

Kiel ,Flash Magic and Proteous

Objectives

(Skill Set / Knowledge Tested / Imparted)

Knowledge of Assembly Language Programming of 8086.

To gain work expertise in Development tools and Life Cycle and instruction set of 8051.

Theory of Operation

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 important 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.

Page 2: MCA 5

DEPARTMENT OF ELECTRONICS ENGINEERING Experiment No. 5Semester T.E. Semester V – Electronics Engineering

Subject Microcontrollers and Applications

Algorithm :

1. Start.2. Set 0th pin of port 2.3. Clear 1st pin of port 2.4. Call delay subroutine.5. Clear 0th pin of port 2.6. Set 1st pin of port 2.7. Call delay subroutine.8. Jump to step number 2.9. End.

Flow chart : Start

Set P2.0

Clear P2.1

Call delay subroutine

Clear P2.0

Set P Call delay subroutine

Page 3: MCA 5

DEPARTMENT OF ELECTRONICS ENGINEERING Experiment No. 5Semester T.E. Semester V – Electronics Engineering

Subject Microcontrollers and Applications

Coding Sheet: For writing 8051 Programs in Assembly Language

Label/Symbol Assembly Language Code

(Mnemonics)

Comments

ORG 0000 H Start program from 0000 H

UP: SETB P2.0 Set P2.0

CLR P2.1 Clear P2.1

ACALL DELAY Call delay

CLR P2.0 Clear P2.0

SETB P2.1 Set P2.1

ACALL DELAY Call delay

SJMP UP Jump to UP

DELAY: MOV R3, #50 H R3 = 50 H

CC: MOV R4, #50 H R4 = 50 H

BB: MOV R5, #50 H R5 = 50 H

AA: DJNZ R5, AA R5=R5-1; if R5≠0, jump to AA

DJNZ R4, BB R4=R4-1; if R4≠0, jump to BB

DJNZ R3, CC R3=R3-1; if R3≠0, jump to CC

RET Return from sub-routine

END End

Page 4: MCA 5

DEPARTMENT OF ELECTRONICS ENGINEERING Experiment No. 5Semester 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.

Page 5: MCA 5