running a stepper motor using a L293D driver from the 8051 processor - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

running a stepper motor using a L293D driver from the 8051 processor

this is the code that i wrote for running my stepper motor thru the L293D driver. the output is meant for running the stepper motor (generating a waveform with 4 outputs, being : 1) 1001
2) 0110
3) 1100
4) 0011 )
can anyone help me to check if the code is correct??? my motor doen't seem to run, nor even generate waveforms of the needed output. its urgent... can anyone help?

ORG 0000H
JMP MAIN
ORG 100H
MAIN: SETB P0.4
SETB P0.0
CLR P0.1
SETB P0.2
CLR P0.3
SETB P0.5
MOV TMOD,#01H
LOOP: MOV TH0,#0FEH
MOV TL0,#0CH
SETB TR0
WAIT: JNB TF0,WAIT
CLR TR0
CLR TF0
JB P0.5,ALT
CPL P0.0
CPL P0.1
CPL P0.5
ALT: CPL P0.2
CPL P0.3
CPL P0.5
JMP LOOP
END

thanx...
Sign In or Register to comment.