#MA #8051 Stepper Motor Anticlockwise Rotations



ORG 0000H;

SJMP Main; 

ORG 0030H

 Main:Mov A,#09H //anti-clockwise direction first sequence 1001

Acall Delay

Mov A,#03H     //anti-clockwise direction second sequence 0011

Acall Delay

Mov A,#06H   //anti-clockwise direction third sequence 0110

Acall Delay

Mov A,#0CH   //anti-clockwise direction fourth sequence 1100

Acall Delay


SJMP Main

Delay: Mov P2,A

MOV R3,#06H;

     L2: MOV R6,#07H;

L1: MOV R7,#06FH;

     L0: DJNZ R7, L0

     DJNZ R6, L1

        DJNZ R3, L2

       

    RET

END 

Comments