Hi, My problem: ------------------- I want to control the thickness of condensation of a sample gas on a metal surface by controlling the temperature of the surface. This is a fundamental method of measuring humidity, where the temperature of the surface which causes the sample gas to begin to condense is directly proportional to humidity. (Clever hey ? - but no real secret, the method has been around for donkeys years). The temperature measurement needs to be precise (within 0.3 degC accuracy) using a PRT-100 (Platinum Resistance Thermometer). The method to detect moisture or condensation is by light transmission & detector. The light is directed onto the surface and the detector measures the reflected light from it. When condensation occurs, the reflected light is scattered and the detector sees this and attempts to control the temperature of the surface at this point. This temperature is then displayed and is known in the industry as Dewpoint (the point at which dew forms!) and is of course a derivative unit of humidity. The device for cooling and heating the surface is a peltier heat pump. Anyway... I want to control the temperature of the surface with a PIC using PID control. And i want to program the PIC in CCS C, of which i already have some experience. Obviously, i would like to be able to easily change the P, I and D settings in software so I can experiment. My question is... Can anyone help me on PID control ? Has anyone already done PID control with a PIC ? - or have algorithms already ? Anyone any experience on adaptive tuning or self tuning PID controllers ? Any help or advice very, very much appreciated. Darren