In: Computer Science
Write an ALP to control the different direction of rotation of stepper motor
Stepper motor has the following specifications
Stepper motor has 4 windings
Speed =12 rpm
No of teeth =200
Answer : Given data
* The stepper motor is interfaced with t port C of 8255 Programmable peripheral interface (PPI) and through 8051 .
* Interfacing diagram of Stepper motor through transistor amplifiers and 8051 Microcontroller
* Since,RPM = 12,i.e 12x 360 = 4320 degree of rotation /min
for 200 steps =3600
1 step = 360/200 = 1.80
For four data one time = 7.20
repeat this data 600 times will produce 12 RPM.
R3 register will contain 600 decimal = 258 H; i.e R3 = 258H
* ASL code for Rotating the stepper motor in a clock wise direction
8009 MOV R3,#258; (R3) = 258H
8023 DJNZ R3,REPEAT; Decrement R3 and jump to REPEAT if R3≠0
* ASL code for Rotating the stepper motor in anticlock wise direction
8009 MOV R3,#258; (R3) = 258H,
8023 DJNZ R3, REPEAT; Decrement R3 and jump to REPEAT if R3≠0
8025 LCALL 0003; End of the program
_______THE END_____________