Hi Ed, I hope the following information will be of some interest for you. I've been searching for an programmable PID algorithm some weeks ago and found one on a german web-site. http://www.uni-karlsruhe.de/~unbd/sa/node6.html Well for the case you can't read german I will give you the rough outline. As you can see on the web-page under (12) the formula for the PID has got an integral, that is the main problem programming the algorithm. So the author does an approximation using the formula given under (13) which results in the easy programmable formula under (14). Since there are only +,-,/ operations this one should be very easy to prorgram (I've done this only once in basic, so I can't give you any source in assembly or C). I hope that the variables are called the same for the english speaking people, if not feel free to write me back and I'll do my very best with my bad english to explain you which is what. Greets, Michael EH> Hi All, EH> I am looking for some help with programing PID algorithms. EH> I have tuned them for years but never have had to code one. EH> The output will be fed to a D/A converter with a +10 to -10 EH> Vdc output swing to drive a standard servo amp. Any help EH> in Assembly or C would be appreciated. EH> Thanks in advance EH> Ed Heath EH> IAI EH> -- EH> http://www.piclist.com hint: The PICList is archived three different EH> ways. See http://www.piclist.com/#archives for details. -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.