Dear Jamil, Can timer 1 and CCP1 and CCP2 be used to control two motors independently each with frequency range from 100Hz to 300Hz ? If Ok, how ? Regards, Samuel Lau "Jamil J. Weatherbee" wrote: > That shouldn't be too tough, but keep in mind the following: > > On the CW/CCW line you'll just toggle depending on the direction you want > to go. > The Pulse signal will be the tough part but at low frequencies like 100hz > you can basically put the toggling of the line into the time interrupt > routine, along with a counter to count how many pulses are remaining etc. > > Problem is the motor has some inertia and for smooth control you want to > ramp the pulse frequency up at the beggining of the pulse train and down > towards the end, so for this you can slow down the toggle rate, like once > every 2 timer interrupts, once every 3,4,5, etc. interrupts. > > I have some drivers just like the ones you are describing except the > selections for phase excitation are via dip switches. > > hope this helps > > On Wed, 19 May 1999, Lau Chi Cheung, Samuel wrote: > > > Dear Jamil, > > > > Thank you for your help ! > > > > In my project, I used two bipolar stepping motors of 1.8deg/step. > > Also, I used two drivers to drive these motors. > > > > Each driver has the following characteristics: > > 1) 2 phase Excitation 1.8deg/step > > 2) 1-2 phase Exciation 0.9deg/step > > 3) Only 2 control signals needed to implement the control > > a) One is Pulse signal (control the velocity of the motor) > > b) Another is direction signal ( either High or Low for CW or CCW > > direction) > > 4) For excitations in case 1) or 2), another control signal (High or Low) > > play the part. > > > > I want the program that can control the two motors independently and > > each motor can run at frequencies from 100Hz to 300Hz. > > > > Thanks, > > Samuel Lau > > > > "Jamil J. Weatherbee" wrote: > > > > > Wait, I have dealt with "Stepper Drivers" and also directly interfacing to > > > unipolar and bipolar stepper motors. What is it exactly that you have and > > > how is it labeled? > > > > > > On Wed, 19 May 1999, Lau Chi Cheung, Samuel wrote: > > > > > > > Hi, all > > > > > > > > I have used a PIC16C74 20MHz microcontroller to control > > > > two stepping motors. > > > > > > > > Could you help me how to control these motors with 4 control > > > > signals (two are for output pulses from 100Hz to 300Hz and > > > > the other two signals are for direction control) > > > > > > > > Thanks, > > > > Samuel Lau > > > > > > > >