Jinx wrote: > > This sounds to me like a filtering problem. You have data coming > > in in bursts, and need to send it out smoothly in time > > That's pretty much it in a nutshell. If I could count on new data exactly > every 15ms things would be so much easier. Considering there's a > (presumably heavy duty) micro inside the gyro, I'm disappointed that > the data timing is so rough Hi Jinx, I still don't understand the exact problem. :o) Is it like this: * gyro outputs an "error" signal every 5mS to 20mS * period between signals is unknown and varying * you decode error signal and generate number of pulses to turn stepper motors to re-stabilise gyro again * the ideal is to turn motors at perfect speed so the error is zero by the time next error signal arrives, so no dead band or overlap. If I understand the problem you can get around it by always keeping one error signal in buffer, this gives you lag of one period, up to 20mS. The advantage is that you can then see the "future", you know WHEN the next error signal will arrive and can turn the motor at the correct speed so it gets to the goal exactly when the next signal arrives. So you have both the error DISTANCE and also the TIME allowed to correct it. Obviously pulse frequency is adjusted for each sample to ensure the motor arrives at goal position at the end of the period. Is this workable, ie can you afford one period lag? Or have I just misunderstood the problem entirely?? :o) -Roman -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body