Interfacing Stepper
motor with 8051
Contents at a Glance
8051 - TRAINER BOARD....................................................3
STEPPER MOTOR .............................................................3
INTERFACING STEPPER MOTOR........................................4
INTERFACING STEPPER MOTOR WITH 8051 ......................5
PIN ASSIGNMENT WITH 8051 ...........................................5
CIRCUIT DIAGRAM TO INTERFACE STEPPER MOTOR .6
ASSEMBLY PROGRAM TO RUN THE STEPPER MOTOR .... 7
http://www.pantechsolutions.net
http://www.pantechsolutions.net
http://www.pantechsolutions.net
P1.0
COIL-B
P1.1
COIL-C
P1.2
COIL-D
P1.3
VCC
MOTOR_PWR
STEPPER
COIL-A
COIL-B
COIL-C
COIL-D
IN1
IN2
IN3
IN4
OUT1
OUT2
OUT3
OUT4
EN1
EN2
1
2
3
MG1
COIL-A
8051 Lines
Stepper Motor(5V)
VS
VSS
STEPPER MOTOR
(Stepper Motor)
http://www.pantechsolutions.net
http://www.pantechsolutions.net
OP CODE
MNEMONICS
COMMENTS
8500
74 80
MOV A, #80H
8502
90 40 03
8505
F0
MOVX @DPTR, A
8506
90 40 00
8509
74 66
MOV A, #66H
850B
F0
AGAIN:MOVX@DPTR, A
850C
03
RR A
850D
B1 11
ACALL DELAY
wait
850F
80 FA
SJMP AGAIN
8511
7D 05
8513
7C 0F
H3:
8515
7B 43
H2:
8517
DB FE
H1 :
DJNZ R3, H1
8519
DC FA
DJNZ R4, H2
851B
DD F6
DJNZ R5, H3
851D
22
RET
Return
NOTE:
To turn the motor in the reverse direction enter as (Rl A instead of RR A).
The schematics sections given is, stepper motor connected to port 1 and the sample
program is given based on 8255.
http://www.pantechsolutions.net
http://www.pantechsolutions.net
What do we sell?
Our products range from Various Microcontroller
development boards, DSP Boards, FPGA/CPLD boards,
Communication Kits, Power electronics, Basic electronics,
Robotics, Sensors, Electronic components and much more . Our
goal is to make finding the parts and information you need
easier and affordable so you can create awesome projects and
training from Basic to Cutting edge technology.
http://www.pantechsolutions.net