Jose; You may not need PID at all.. If you just want to do AC power control, try simply programming a follower. Let's say you have a target setpoint. Then make a second variable of the same type that goes to the output. Alllow a timer to increment or decrement the following variable on a periodic basis. You can then adjust the rate of change of the follower. This will allow a somewhat sloppy feedback control, and is much easier to program. You will have implemented an I term only controller. Chris Eddy Pioneer Microsystems, Inc. DIAZ SUSANIBAR wrote: > Thank you for reading this message. i am student of electronic, and > I have a hard task. I need to control the output of a > variac(kind of autotransformer), I think to do this measure the > output voltage, and then with this do a PID control into PIC, but I dont > know how to do a pid control into PIC. then the pic set a circuit which > active or desactive a dc motor for change the voltage of the variac. > I am really sad and fear because i dont know how to do this > sorry for all. thank you very much. > SINCERELY > JOSE DIAZ