AnsweredAssumed Answered

one timer for puls output - another timer for counting the pulses - other solution ?

Question asked by karakaya.mehmet on Jan 14, 2013
Latest reply on Jan 14, 2013 by Clive One
hello forum ,

I am using %50 duty PWM output of one timer
for sending pulses ( position command ) to servo motor

however I need counting the same pulses in order to know
that exact number of pulses have been sent
( think acceleration and deceleration ramps of position command )

so I do count the pulses with another timer every 5 milisecond 
and if the count is less I increase the frequency, if it is more I decrease the frequency of PWM
in the next 5 milisecond ( my scan time )

so far this technic is working 
however I need 4 position command 
and I need 8 timers
the max frequency will be 400 KHz

my question ;
is there another solution to this problem?
I mean only one timer per position command

thank you 

Outcomes