Statement: Interface a Stepper Motor to the 8085 microprocessor system and write an 8085 assembly language program to control the Stepper Motor.
HARDWARE FOR STEPPER MOTOR CONTROL
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.
Fig. shows the interfacing diagram to control 12 electric bulbs. Port A is used to control lights on N-S road and Port B is used to control lights on W-E road. Actual pin connections are listed in Table 1 below.

SOFTWARE FOR STEPPER MOTOR CONTROL
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
Delay Subroutine:
- Delay: LXI D, Count
- Back: DCX D
- MOV A, D
- ORA E
- JNZ Back
- RET
|
FLOWCHARTS
|
Source Program

|
Stepper Motor Subroutine

|
Delay Routine
|
Related Programs (Click down)
Generate and display binary up counter
Generate and display BCD up counter with frequency 1Hz
Generate and display BCD down counter
Generate and display the contents of decimal counter