Statement: Interface a Stepper Motor to the 8085 microprocessor system and write an 8085 assembly language program to control the Stepper Motor.
Home
8085 Forum
8085 Free Projects
8085 Free Programs
8085 Tutorials
8085 details
Interfacing Techniques
Electronic Tutorials
Electronic Projects
Assembler/ IDE
Datasheets
Guest Book
About Me


As port A is used as an output port, control word for 8255 is 80H.

Stepper Motor Control Program:

               6000H Excite code DB 03H, 06H,
                                          09H, OCH : This is the code sequence for clockwise rotation

Subroutine to rotate a stepper motor clockwise by 360° - Set the counts:

       MVI C, 32H                        : Set repetition count to 50ıο
START: MVI B, 04H                        : Counts excitation sequence
       LXI H, 6000H                        : Initialize pointer
BACK1: MOV A, M                        : Get the Excite code
       OUT PORTA                        : Send Excite code
       CALL DELAY                        : Wait
       INX H                                : Increment pointer
       DCR B                                : Repeat 4 times
       JNZ BACK l
       DCR C
       JNZ START                        : Repeat 50 times
       RET

INTERFACING SCHEME




Delay subroutine:

Delay: LXI D, Count
Back: DCX D                        
       MOV A, D        
       ORA E                
       JNZ Back                
       RET

A stepper motor is a digital motor. It can be driven by digital signal. Fig. shows the typical 2 phase motor rated 12V /0.67 A/ph interfaced with the 8085 microprocessor system using 8255. Motor shown in the circuit has two phases, with center-tap winding. The center taps of these windings are connected to the 12V supply. Due to this, motor can be excited by grounding four terminals of the two windings. Motor can be rotated in steps by giving proper excitation sequence to these windings. The lower nibble of port A of the 8255 is used to generate excitation signals in the proper sequence. These excitation signals are buffered using driver transistors. The transistors are selected such that they can source rated current for the windings. Motor is rotated by 1.80 per excitation.
HARDWARE FOR STEPPER MOTOR CONTROL
SOFTWARE FOR STEPPER MOTOR CONTROL




FLOWCHARTS




Source Program
Delay routine
Stepper motor subroutine