Take a look at http://www.bytecraft.com/addaconv.html for a very simple A/D. If you need more bits, just add some dither to the analog signal and then use the average value of many samples. For example, the average of 4 samples will add 1 bit of resolution to the measurement. The average of 16 samples will give you 2 bits . -Frank ----- Original Message ----- From: "juan manuel garofalo" To: Sent: Monday, February 04, 2002 6:08 PM Subject: [pic]: adc > Hi there: > > > 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 ? > > > Thanks in advance. > > jm > > -- > http://www.piclist.com#nomail Going offline? Don't AutoReply us! > email listserv@mitvma.mit.edu with SET PICList DIGEST in the body > > -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body