I built this 7-8 years back using only analog stuff, now its not working = 100% ok anymore so now is a good time to upgrade it using a MCU. And add some bells and whitles to make it upto date. Will add a RS232 = port so I can adjust values realtime when running the mashine. Your idea would prolly work but sounds a bit like overkill to me ;) > Would a hardware solution work? Use the input to pulse a RC circuit = (2 resistors > and 1 cap). Feed the cap voltage back to another input pin. More = pulses (1's) =3D > more voltage across the cap. At some point you would have your = digital high on the > 2nd input pin. Would make it easy to adjust your trip-point (if you = need to do > that) on the fly but of course it uses more pins and external = hardware. -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.