STEPPER MOTOR INTERFACING
AIM OF THE EXPERIMENT:
To write an assembly language program in 8086 to rotate the motor at different speeds.
APPARATUS REQUIRED:
SL.NO ITE SPECIFICATION QUANTIT
M Y
1. Microprocessor kit 8086 1
2. Power Supply +5 V, dc,+12 V dc 1
3. Stepper Motor Interface - 1
board
4. Stepper Motor - 1
THEORY:
A motor in which the rotor is able to assume only discrete stationary
angular position is a stepper motor. The rotary motion occurs in a stepwise manner
from one equilibrium position to the next.Two-phase scheme: Any two adjacent
stator windings are energized. There are two magnetic fields active in quadrature
and none of the rotor pole faces can be in direct alignment with the stator poles. A
partial but symmetric alignment of the rotor poles is of course possible.
ALGORITHM:
For running stepper motor clockwise and anticlockwise directions
(i) Get the first data from the lookup table.
(ii) Initialize the counter and move data into accumulator.
(iii) Drive the stepper motor circuitry and introduce delay
(iv) Decrement the counter is not zero repeat from step(iii)
(v) Repeat the above procedure both for backward and forward directions.
SWITCHING SEQUENCE OF STEPPER MOTOR:
MEMORY A1 A2 B1 B2 HEX
LOCATION COD
E
4500 1 0 0 0 09 H
4501 0 1 0 1 05 H
4502 0 1 1 0 06 H
4503 1 0 1 0 0A H
LABEL PROGRAM COMMENTS
START MOV DI, 1200H Initialize memory location to store the array of
number
MOV CX, 0004H Initialize array size
LOOP 1 MOV AL,[DI] Copy the first data in AL
OUT 0C0,AL Send it through port address
MOV DX, 1010H
L1 DEC DX Introduce delay
JNZ L1
INC DI Go to next memory location
LOOP LOOP1 Loop until all the data’s have been sent
JMP START Go to start location for continuous rotation
1200 09,05,06,0A Array of data’s
RESULT: Thus the assembly language program for rotating stepper motor in both
clockwise and anticlockwise directions is written and verified.
START
INTIALIZE COUNTER FOR LOOK UP TABLE
FLOWCHART:
GET THE FIRST DATA FROM THE ACCUMULATOR
MOVE DATA INTO THE ACCUMULATOR
DRIVE THE MOTOR
DELAY
DECREMENT COUNTER
YES
IS B = 0 ?
NO
GET THE DATA FROM LOOK UP