Is it need the pulse width modulation(pwm) code for control the movement of motors?if yes, how to use the 8051 language to generate it(pwm)?if not,got any others way? Thanks for the reply and suggestion.
Yes, the best method of control the speed, direction and position of a motor is using PWM, with 8051 you must use 2 timers, one to set the period and another to set the width of the pulse, the speed is proportional to the pulse width