georgio17
Newbie level 6
Hi i am newbie and i am just learning how to write programs in c for PIC 16f877a
I have written a code for rotating a stepper motor forward and backward.
Its basically i want to move the panel from morning 6 to evening 6 that is i want the motor to rotate 180 degrees in the entire 12 hour period and then quickly return to back its original position that is rotate revese by 180 degrees quickly and wait till 6 next morning to start rotating again.
The problem i have noticed is that in PROTEUS simulation i have set the stepper motor to move at an angle of 90* but in the first cycle it moves 45* and then by 90* each so when it comes back to its original position it does boack by -45* I dunno why this is.
Also what is the minimum delay i can implement on a stepper motor??
And i want to implement a delay of about 12 hours what code should i use or can i use a code to turn it off for 12 hours??
Could you'll please help me.
Sorry for asking so many questions but i would really help me to understand better.
Thank You
I have written a code for rotating a stepper motor forward and backward.
Its basically i want to move the panel from morning 6 to evening 6 that is i want the motor to rotate 180 degrees in the entire 12 hour period and then quickly return to back its original position that is rotate revese by 180 degrees quickly and wait till 6 next morning to start rotating again.
The problem i have noticed is that in PROTEUS simulation i have set the stepper motor to move at an angle of 90* but in the first cycle it moves 45* and then by 90* each so when it comes back to its original position it does boack by -45* I dunno why this is.
Also what is the minimum delay i can implement on a stepper motor??
And i want to implement a delay of about 12 hours what code should i use or can i use a code to turn it off for 12 hours??
Could you'll please help me.
Sorry for asking so many questions but i would really help me to understand better.
Thank You
Attachments
Last edited: