Can any body give me a good source code for controlling the 12 volt stepper motor speed .I am using Atmel's 89C52 controller.I am just using 4 pins of my port-1 to energize the motor's windings. this is the the code unit which i work for but its not wotking some how, ********************************************* int i,j; unsigned char STEP[4] = {0x0A,0x09,0x05,0x06}; //these r my switching sequence for my unipolar stepper motor// while(1) { for(i =0;i<4; i++) { P1 = STEP[i]; for(j=0;j<5;j++) { _nop_(); } } }
In what way does the motor get stuck? Timing is everything, so are you either driving the motor past its maximum speed or acceleration? I might help to start with a single phase driver just to verify that there are no fundemental problems with you driver circuit. Driving stepper motors should be fairly straightforward, but the details of the characteristics of a particular motor and its load are very important. There is loads of information on the internet. There is some basic information here: http://209.41.165.153/stepper/Tutorials/UniTutor.htm