100% found this document useful (1 vote)
711 views2 pages

Stepper Motor Interfacing With 8051 Micro Controller

This document describes how to interface a stepper motor with an 8051 microcontroller using assembly language. It provides the required apparatus, procedure to run the motor in forward and reverse directions by entering different values, and a program that initializes the starting address, enters mnemonics, runs the program, and uses different values to run the motor forward and backward through full step resolution.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
711 views2 pages

Stepper Motor Interfacing With 8051 Micro Controller

This document describes how to interface a stepper motor with an 8051 microcontroller using assembly language. It provides the required apparatus, procedure to run the motor in forward and reverse directions by entering different values, and a program that initializes the starting address, enters mnemonics, runs the program, and uses different values to run the motor forward and backward through full step resolution.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

STEPPER MOTOR INTERFACING WITH

8051 MICRO CONTROLLER


AIM
To run a stepper motor in forward and reverse direction using 8051 Assembly
Language.

APPARATUS REQUIRED:
1. Stepper motor.
2. Interface board.

PROCEDURE
1. Switch ON the microcontroller.
2. Initialise the starting address.
3. Enter the mnemonics in the microcontroller.
4. Save the mnemonics in the microcontroller.
5. Run the program.
6. Enter 09 05 06 0A to run the stepper motor in the forward direction.
7. Enter 0A 06 05 09 to run the stepper motor in the reverse direction.

FULL STEP RESOLUTION


A+ A- B+ B- ASM Value
ON OFF OFF ON 09
OFF ON OFF ON 05
OFF ON ON OFF 06
ON OFF ON OFF 0A

PROGRAM:

4100 ORG 4100H


4100 90 45 00 START: MOV DPTR,#4500H
4103 78 04 MOV R0,#04
4105 E0 JO: MOVX A,@DPTR
4106 C0 83 PUSH DPH
4108 C0 82 PUSH DPL
410A 90 FF C0 MOV DPTR,#FFC0
410D 7A 04 MOV R2,#04
410F 79 0F MOV R1,#0F
4111 7B 0F DLY1: MOV R3,#0F
4113 DB FE DLY: DJNZ R3,DLY
4115 D9 FA DJNZ R1,DLY1
4117 DA F8 DJNZ R2,DLY1
4119 F0 MOVX @DPTR,A
411A D0 82 POP DPL
411C D0 83 POP DPH
411E A3 INC DPTR
411F D8 E4 DJNZ R0,JO
4121 80 DD SJMP START
4123 END
4500 09,05,06,0A TABLE DB 09,05,06,0A
RESULT:
Stepper motor was executed in forward and reverse condition and execution is
observed.

You might also like