The pulse signal and direction control signal of the step motor drive can be generated by the loop through the I/O port of the single chip
Of course I can. But it's not very good. Because, "through the cycle, delay" to control the timing, not only difficult to accurate timing, and procedures and other operation control sequence of thrust, likely is quite complicated. Stepper motor, for example, in order to prevent out of step, don't want to speed "mutation", so a good program are designed to be "gradient" frequency, the best made during acceleration and deceleration "acceleration", "slow". In this way, it is difficult to avoid complexity by using the "loop, delay" to control the spacing of the pulses. A good way to do this is not to use the counting loop to delay, but the timer interrupts to control the sequence.
If you the speed without any requirements, you can limit the speed of not more than a smaller value, in other words, that is every two spacing between the pulses of not less than a fixed value, can ensure that do not break step. The fixed boundaries can be determined.
The step motor I used was a step motor drive, controlled by a single chip. As for direct control, you really don't know
Stepper motor is a kind of induction motor, its working principle is the use of electronic circuit, direct current (dc) into time-sharing power supply, multiphase sequential control current, in this current for stepper motor power supply, step motor to work properly, is time-sharing power supply for step motor drive, multiphase timing controller. Although the stepping motor has been widely used, the step motor is not used as a normal dc motor and ac motor is used regularly. It must be used by the control system such as double ring pulse signal and power drive circuit. Therefore, it is not easy to use a good step motor, which involves a lot of specialized knowledge, such as machinery, electrical machinery, electronics and computers. Stepping motor is one of the key products of mechanical and electrical integration, and is widely used in various automatic control systems. With the development of microelectronics and computer technology, the demand for stepping motors is increasing, and there are applications in the national economy.
The pulse signal and direction control signal of the step motor drive can be directly generated by the loop and delay programming of the I/O port of the single chip. SCM in general there are two ways to make step motor rotation, the first is a software delay, is delay programming directly produce the second is the interrupt, use a timer interrupt a stepper motor pulse signal control. The step motor is an open loop controlling element which converts the electrical pulse signal into angular displacement or line displacement. In the case of the overload, motor speed, stop position depends only on the pulse signal frequency and pulse number, and not affected by load change, when the stepper driver receives a pulse signal, it is driving a stepper motor according to set the direction of a fixed Angle, known as the "step Angle", its rotation is based on the Angle of the fixed step by step. It can control the amount of angular displacement by controlling the number of pulses, so as to achieve accurate positioning. At the same time, the speed and acceleration of the motor can be controlled by controlling the pulse frequency to achieve the goal of speed adjustment.