Hi Theresa Schousek : Thanks for the infomation. This is a good reference for the PID. But what I'm looking for is a simple PID algorithm written in PIC instruction set. Do you have any idea where I can get it? > > http://members.aol.com/JohnShaw/pid/index.html > has a good discussion of PID control including, one page down, a pseudo-code > implementation. I haven't personally tried it but the explanation is quite > clear and it might help. > ....."The journey of a thousand miles begins with a small step in the right direction."....... ---------------------------- Name : Koh Teik Siong Email : tsk196@soton.ac.uk Tel : +44 (01703) 766255 Address : Flat 4 Rm 19 Beechmount House Beechmount Rd Bassett Southampton SO16 3JD -----------------------------