Google

Oct 15, 2008

Program to interface stepper motor with 8086 and rotate with anti clock wise direction in full stepping

The following program is to interface stepper motor with 8086 and rotate with anti clock wise direction in full stepping. The purpose of this is to observe and control the stepping action of the motor using assembly language code. The code is also practically illustrated with two live demonstrations on how speed of the motor varies if one of the instruction codes is changed to a new value.

Code:

MOV DX,8807 : Load DX with control word register address of 8255
MOV AL,80 : load control word 80 into AL
OUT DX,AL: Contents of AL are loaded into control word register of 8255
MOV DX,8801: Load PortA address of 8255 into DX
MOV AL,33: Load value 33 into AL
Again OUT DX,AL: Contents of AL are loaded into control word register of 8255
MOV CX,0100: set counter to delay
Loop Again
ROL AL,1 : Rotate left by 1
JMP Again : Unconditional jump to label again

Following is the practical illsutration of the output for the above given code.



The instruction MOV CX,0100 can be changed to a new value in order to vary the speed.
So, for instance lets say MOV CX,7000. Following is the video demonstration of how the speed varies if the value is changed in the above instruction


Thus by changing the instruction the speed of the stepper motor can be varied according with interfacing it to an 8086 microprocessor for full stepping

Related posts:
Interfacing a stepper motor with an AVR Microprocessor

Interfacing a stepper motor with pic micro controller

Interfacing a stepper motor to 8086 using 8255

No comments: