Interfacing Stepper Motor To 8086 Using 8255
Interfacing Stepper Motor To 8086 Using 8255
Interfacing Stepper Motor To 8086 Using 8255
To Interface Stepper Motor to 8086 using 8255 and write Assembly Language
Program to rotate Stepper Motor in Clockwise & Anticlockwise direction.
APPARATUS:-
Microprocessor trainer kit, ADC kit, power supply, data cable etc
THEORY:-
After the rotation of the shaft through angle x, the rotor locks it self with the next
tooth in the sequence on the internal surface of the stator. The typical schematic of
a typical stepper motor with four windings is as shown below.
The stepper motors have been designed to work with digital circuits. Binary level
pulses of 0-5V are required at its winding inputs to obtain the rotation of the shafts.
The sequence of the pulses can be decided, depending upon the required motion of
the shaft. By suitable sequence of the pulses the motor can be used in three modes
of operation.
8255 is interfaced with 8086 in I/O mapped I/O. port C (PC0, PC1, PC2, PC3) is used
to give pulse sequence to stepper motor. The 8255 provides very less current which
will not be able to drive stepper motor coils so each of the winding of a stepper
motor needs to be interfaced using high speed switching Darlington transistors with
max 1A, 80V rating with heat sink, with the output port of 8255. Output the
sequence in correct order to have the desired direction to rotate the motor.
MODEL SMALL
.STACK 100
.DATA
.CODE
START:
MOV AL,@DATA
MOV DX,CTL
OUT DX,AL
AGAIN:
MOV AL,PHASEC
MOV DX,PORTC
OUT DX,AL
MOV CX,0FFFFH
UP:
LOOP UP
MOV AL,PHASEB
MOV DX,PORTC
OUT DX,AL
MOV CX,0FFFFH
UP1:
LOOP UP1
MOV AL,PHASED
MOV DX,PORTC
OUT DX,AL
MOV CX,0FFFFH
UP2:
LOOP UP2
MOV AL,PHASEA
MOV DX,PORTC
OUT DX,AL
MOV CX,0FFFFH
UP3:
LOOP UP3
INT 03H
END START
.STACK 100
.DATA
.CODE
START:
MOV AL,@DATA
MOV DX,CTL
OUT DX,AL
AGAIN:
MOV AL,PHASEC
MOV DX,PORTC
OUT DX,AL
MOV CX,0FFFFH
UP:
LOOP UP
MOV AL,PHASEA
MOV DX,PORTC
OUT DX,AL
MOV CX,0FFFFH
UP1:
LOOP UP1
MOV AL,PHASED
MOV DX,PORTC
OUT DX,AL
MOV CX,0FFFFH
UP2:
LOOP UP2
MOV AL,PHASEB
MOV DX,PORTC
OUT DX,AL
MOV CX,0FFFFH
UP3:
LOOP UP3
INT 03H
END START
PROCEDURE:-
1. Connect power supply 5V & GND to both microprocessor trainer kit & Stepper
motor interfacing kit.
2. Connect data bus between microprocessor trainer kit & Stepper motor interfacing
kit.