Fitting pulses into a time slot
Russell McMahon email (remove spam text)
> OK, I thought I understood. But the new data arrives at exactly 32ms
> intervals. If you had 1781 pulses @ 82 IC, the pulses would run out with
> 1423 IC left in the accumulator and no new data for another 309us after
> the last pulse. ??????? Wouldn't that system work only if you delayed
> output by a further 32ms so that you had two sets of data to work with ?
No. Keep on subtracting so that you have sent too many samples. At the end
of the time the negative error in the accumulator reduces the amount you are
required to send next time. The new calculation is based on this result.
http://www.piclist.com hint: To leave the PICList
See also: www.piclist.com/techref/microchip/time.htm?key=time
You must be a member of the
piclist mailing list
(not only a www.piclist.com member) to post to the