Try microchip's app note AN512. That is the basic method for pseudo-a/d input to a PIC without using a real a/d input. I've used this idea for many years, recently began using it to generate 16 bit a/d without an expensive a/d input. Realistically, you won't get 16 bits of accuracy. Your accuracy will increase if you filter your input by various techniques. I either take a median or an average, with median being preferred (check my web page for details on median filters) because of no math and no rounding errors. Best Regards Lawrence Lile >> AutoCad Blocks for electronics >>PIC stuff incl MEDIAN FILTER >> PEN PLOTTER to PC board conversion >> Amateurish pictures of me and my recumbent bicycles HTTP://home1.gte.net/llile/ -----Original Message----- From: Gus Calabrese To: PICLIST@MITVMA.MIT.EDU Date: Tuesday, March 30, 1999 11:08 AM Subject: Using 12C67x and a CdS cell >Having discussed bit and pieces of monitoring a CdS cell with PICsters >, I now want to elicit final suggestions. > >The CdS cell varies from 9K to 500K ohms resistance. >To take a sample of the cell resistance 3 times per second, >should I use the CdS to charge up a cap and read that >with an A/D? If so, what is the minimum cap size? >OR should I charge a cap until it crosses the digital threshhold >of a digital input and time that? Same size cap? > >I think I require a resolution of about 1 part in 25. > >Any and all responses are gratefully endured... > >Gus > >-- >Y2K The biggest block party on the planet > http://www.frii.com/~wft/Y2K.html Let's party ! ! ! ! ! > >Gus Calabrese Lola Montes WFT Electronics >4337 Raleigh Street Denver, CO 80212 >303 964-9670......voicemail mailto:wft@frii.com > http://www.frii.com/~wft > >Alternate: 791 High Street Estes Park, CO 80517 >if no success with wft@frii.com, try .... >mailto:wft@bigfoot.com then mailto:wft@eudoramail.com