628 already have internal ref, not too good, low resolution, you should have 10bits resolution with pwm but you'll have a lousy comparation threshold detection even with externaly positive feedback on the comparator. Try 12F675 or 16F870 regards, Vasile http://www.geocities.com/vsurducan On Mon, 7 Oct 2002, Mike Singer wrote: > > On Sun, 6 Oct 2002, Jeethu Rao wrote: > > > Hi all, > > I need a cheap and dirty ADC with a 16f628, > > Scott's RC based ADC is a good option, but > > I think there is a way to use the Comparators > > And the PWM on board the f628 for it. I'm thinking > > Of making an RC low pass filter for the PWM output > > And using it for Ref. I should be able to get the > > Full 10bits accuracy of the PWM (atleast I think so). > > Is this doable or has anyone tried this? > > May be I'm missing something, but why not 16F870? > > PIC16F628 18LD 20MHZ 2K FLASH $2.74 > PIC16F870 28LD 20MHZ 2K FLASH $3.09 > > Are extra pins a big trouble: ATtiny could be an answer. > > Mike. > > -- > 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 hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu