Interfacing Stepper Motor to 8086 using 8255 To To Interface Stepper Motor to 8086 using 8255 and write Assembly Language rogram to rotate Stepper Motor in !loc"wise # Anticloc"wise direction$
AA%AT&S'( Microprocessor trainer "it) A*! "it) power supply) data cable etc
T+,-%. T+,-%.'( Stepper motor is a de/ice used to obtain an accurate position control of rotating safts$ A stepper motor employs rotation of its saft in terms of steps) rater tan continuous rotation as in case of A! or *! motor$ To rotate te saft of te stepper motor) a se1uence of pulses is needed to be applied to te windings of te stepper motor) in proper se1uence$ Te numbers of pulses re1uired re1uired for complete rotation of te saft of te stepper motor are e1ual to te number of internal teet on its rotor$ rotor$ Te stator teet and te rotor teet loc" wit eac oter to 3 a position of te saft$ 4it a pulse applied to te winding input) te rotor rotates by one teet position or an angle 3$ te angle 3 may be calculated as$ 3 600 7 no$ of rotor teet After te rotation of te saft troug angle 3) te rotor loc"s it self wit te ne3t toot in te se1uence on te internal surface of te stator$ Te typical scematic of a typical stepper motor wit four windings is as sown below$
Te stepper motors a/e been designed to wor" wit digital circuits$ circuits$ inary le/el pulses of 0(59 are re1uired re1uired at its winding inputs to obtain te rotation of te safts$ Te se1uence of te pulses can be decided) depending upon te re1uired re1uired motion of te saft$ y suitable se1uence of te pulses te motor can be used in tree modes of operation$ • • •
-ne pase -: ;medium tor1ue< Two Two pase -: ;ig ;ig tor1ue< tor1ue< +alf stepping ;low tor1ue<
4-%=I:>'( 8255 is interfaced wit 8086 in I7- mapped I7-$ port ! ;!0) !?) !2) !< is used to gi/e pulse se1uence to stepper motor$ Te 8255 pro/ides /ery less current wic will not be able to dri/e stepper motor coils so eac of te winding of a stepper motor needs to be interfaced using ig speed switcing *arlington transistors wit ma3 ?A) 809 rating wit eat sin") wit te output port of 8255$ -utput te se1uence in correct order to a/e te desired direction to rotate te motor$
Assembly Language rogram to rotate Stepper Motor in !loc"wise direction M-*,L SMALL $STA!= ?00 $*ATA -%TA ,@& !0+ B -%TA A**%,SS -%T ,@& !2+ B -%T A**%,SS -%T! ,@& !C+ B -%T! A**%,SS !4% ,@& !6+ B !-:T%-L -%T A**%,SS +AS,! ,@& 0+ +AS, ,@& 06+ B S,@&,:!, I: S,%I,S T- %-TAT, M-T-% +AS,* ,@& 0!+ B I: !L-!=4IS, *I%,!TI-: +AS,A ,@& 0D+ $!-*, STA%T' M-9 AL)E*ATA M-9 *F)!TL -&T *F)AL A>AI:' M-9 AL)+AS,! M-9 *F)-%T!
-&T *F)AL M-9 !F)0+ &' L-- & M-9 AL)+AS, M-9 *F)-%T! -&T *F)AL M-9 !F)0+ &?' L-- &? M-9 AL)+AS,* M-9 *F)-%T! -&T *F)AL M-9 !F)0+ &2' L-- &2 M-9 AL)+AS,A M-9 *F)-%T! -&T *F)AL M-9 !F)0+ &' L-- & GM A>AI: B %,,AT, -&T&T S,@&,:!, I:T 0+ ,:* STA%T
1. Assembly Language Program to rotate Stepper Motor in Anticloc!ise "irection
M-*,L SMALL $STA!= ?00 $*ATA -%TA ,@& !0+ B -%TA A**%,SS -%T ,@& !2+ B -%T A**%,SS -%T! ,@& !C+ B -%T! A**%,SS !4% ,@& !6+ B !-:T%-L -%T A**%,SS +AS,! ,@& 0+ +AS,A ,@& 0D+ B S,@&,:!, I: S,%I,S T- %-TAT, M-T-% +AS,* ,@& 0!+ B I: A:TI!L-!=4IS, *I%,!TI-: +AS, ,@& 06+
$!-*, STA%T' M-9 AL)E*ATA M-9 *F)!TL -&T *F)AL A>AI:' M-9 AL)+AS,! M-9 *F)-%T! -&T *F)AL M-9 !F)0+ &' L-- &
M-9 AL)+AS,A
M-9 *F)-%T! -&T *F)AL M-9 !F)0+ &?' L-- &?
M-9 AL)+AS,* M-9 *F)-%T! -&T *F)AL M-9 !F)0+ &2' L-- &2
M-9 AL)+AS, M-9 *F)-%T! -&T *F)AL M-9 !F)0+ &' L-- & GM A>AI: B %,,AT, -&T&T S,@&,:!, I:T 0+ ,:* STA%T
PROCEDURE:-
?$ !onnect power supply 59 # >:* to bot microprocessor trainer "it # Stepper motor interfacing "it$
2$ !onnect data bus between microprocessor trainer "it # Stepper motor interfacing "it$ $ ,nter te program to rotate Stepper motor in cloc"wise # anticloc"wise$ C$ ,3ecute te program by typing >- ,000'00!0 ,:T,% for cloc"wise) >,000'000 ,:T,% for anticloc"wise$ 5$ -bser/e te rotation of stepper motor$