03-08-2013, 02:54 PM
INTERFACING STEPPER MOTOR WITH 8051
AIM:
To interface stepper motor with 8051 parallel port and to vary speed of motor, direction of
motor.
APPARATUS REQUIRED:
8051 Trainer Kit
Stepper Motor Interface Board
THEORY:
A motor in which the rotor is able to assume only discrete stationary angular position is a
stepper motor. The rotor motion occurs in a stepwise manner from one equilibrium
position to next.
The motor under our consideration uses 2 – phase scheme of operation. In this scheme,
any two adjacent stator windings are energized. The switching condition for the above said
scheme is shown in Table.
ALGORITHM:
Store the look up table address in DPTR
Move the count value (04) to one of the register (R0)
Load the control word for motor rotation in accumulator
Push the address in DPTR into stack
Load FFC0 in to DPTR.
Call the delay program
Send the control word for motor rotation to the external device.
Pop up the values in stack and increment it.
Decrement the count in R0. If zero go to next step else proceed to step 3.
Perform steps 1 to 9 repeatedly.
RESULT:
Thus the speed and direction of motor were controlled using 8051 trainer kit.