I realise that I have not made one thing clear enough - it's in the heading but not (strangely) spelt out as clearly as could be in the text. The object is LOWEST COST and also a complete "analog (or equivalent input) to PWM output" circuit. There have been many interesting ideas, but quite a few have no prospect of being lowest cost and some address only part of the requirement. I find ALL circuit suggestions interesting so none of this is wasted on me, but the unspecified (as yet unthought of) virtual (aka non-existent :-) ) prize is for a complete lowest cost solution. Russell McMahon -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu