If you are trying to implement a PID controller on a PIC, this is pretty easy. First, you need to calculate your threee constants, Kp,Ki,and Kd. P = Kp * current value I = Ki * Sum of all previous values D = Kd * ( this value - last value ) PID = P + I + D At least, this is how you do a digital PID. You can also buy PID chips that work in the same fashion. At 10:29 AM 1/25/99 -0400, you wrote: >Hi, My name is Jody Gallant. I am a systems analyst for Tech Sea >Corporation Ltd. in New Brunswick Canada. I am quite new to PIC's but am >trying to learn as much as I can. I am trying to design a circuit to >control the wastegate for the turbocharger on my car. There is nothing >wrong with the one that is built into the ECU but I would like to have >some manual control over this function. > >I have most of the hardware details worked out, but am trying to come up >with a good tuning algorithm for this and would welcome any help. what I >need to do is control an R/C servo (PWM) based on the current MAP >(manifold absolute pressure) and the current Boost preset. I have been >doing a lot of studying on PID loops which might be the best answer, >however I have not been able to come across anything directly related to >PIC 's. > >Thanks in advance for any advice. > >Jody Gallant > > -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Dennis Merrill, BSEE work: merrill@nicolet.com Firmware Engineer home: merrill@ieee.org Embedded Systems Group Nicolet Instrument Corp. phone: 608.276.6136 web: www.geocities.com/ResearchTriangle/5256 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=