Hi Diver,
thanks for the suggestions.
Actually yes I can stick to whole numbers, the only problem being the big error sums and negative numbers for the errors. Will see what I can come up with.
To be honest I should have given more info about the solution I'm creating. The PIC based system is suppose to gather pressure samples over a period of 30s and then recreate the same pressure profile using a DC controlled pump. I've got a pressure transducer hooked up to the system to measure pressure and I'm using a pot to set the pressure during the 30s period of time. I've decided to use 500ms as the sample period, but of course when recreating the profile it's quite hard to do it smoothly. I was thinking of using a PID algorythm with a 'changable' setpoint (sample values) to do this, but if the PID is too slow it will not work properly. I was also thinking of interpolation, but it seems like I will need quite a lot of calcs for it and if for example two sample are close to each other value-wise it won't work smoothly anyway.
Any other suggestions on how to solve this issue (other than gather more data)?
Regards,
dsc.