I am trying to build a vehicle with an arm attached to it...as a part of project..
The project demands the use of 3 "servo" motors so as to keep the torque always...
The problem is the microcontroller pic16f877a needs to deliver signals of ON time(1-2ms) and time period 20ms... simultaneously to the three motor inputs
the point is the three must motors receive 3 different waveforms simultaneously!!!
If we use delay the whole of the µC freezes at that point!!!!
Are to trying to get the servos to combine their torque? A servo tries to position itself to a specific position. It will fight to reach that specific position. It may even burn up trying to reach that position.
Are your servos arranged so they fight against each other?
Or are they acting independently? Each at a separate pivot location? That way one servo does not care what waveform another receives.
The project demands the use of 3 "servo" motors so as to keep the torque always...
...the point is the three must motors receive 3 different waveforms simultaneously!!!
If we use delay the whole of the µC freezes at that point!!!!
@BradtheRad: Thnx for the reply... I am using these 3 motors at separate pivots...just like a mechanical model of our hand..for picking objects!!
bt the problem lies in one uC giving 3 different waveforms at same time to the 3 servos
Does your microcontroller have 3 output pins? Each pin sending a pulse (1 to 2 mSec) to one of the servos?
Or are you sending several pulses in a row from one pin? This is done with radio-controlled planes, etc. A 4017 IC is typically used to split up and distribute the pulses to the servos. Then silence for a fraction of a second. Then another train of pulses.
@BradtheRad: 3 pins of the uC sends pulses to the 3servo's separately...anyway using timers i figured it how!!
@bigdogguru: ur link ws helpful!! I will try to post the code soon
---------- Post added at 23:07 ---------- Previous post was at 21:38 ----------
I tried using timers to control the 3 servos... and it worked perfectly....
Bt am having a problem ... with the use of timers it calls interrupt every 512us i.e, every .5 ms ...
that is i get only one intermediate pulse between 1 and 2ms i.e, 1.5 ms...that's only 3 positions of the servo!!:
\Is there a way to call interrupts lesser than this time a 100us or something???
I use a 4Mhz crystal