> Does it make sense to build an ADC using a PWM output, low pass filtered and > a comparator from a 16f627 ? > My idea is to conect the voltage i want to measure to one input of the > comparator and the pic's PWM output to the other input. Then i sweep the > duty cycle from 0 to the point at wich the comparator changes. My guess is > that it's not a very fast ADC, but that's not a concern. Is this a workable > solution or are there any gotchas i should be aware of ? Nice idea, instead of sweeping though, think about doing a binary search by starting at 50% and playing the higher or lower game, then to 25% or 75% etc.. would increase the speed- even though you say its not a concern now, you may want to use this design in a more time critical application later. Jon Baker ( who used vitrually the same technique to build an analog joystick interface not-so-long ago) -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body