This article introduces a method for the generation of the sinusoid for control by stepping motor.In order to generate the sinusoid for testing control,the normal sinusoid is changed into time data of the timer by software.According to the data of the timer,the singlechip turns the electromotor by the law of sinusoid.The parameters of sinusoid control signal are optional.