Gerhard Fiedler wrote: > > >Why not charge a cap and measure time-to-trip on an input? You only > >need a cap and two resistors. > > I've never tried this approach, but I saw a Philips app note doing some > analysis of a similar method to measure resistance, and they came up with > around 5 bit for the most simple version (one port, one C, and one R), > about 8 bit for a version using two ports and two HC buffers, and around 14 > bit using two comparators. > > Since what you suggest seems to be similar, I think the results might be > similar, too. Do you have any experience with the precision and > repeatability (also over temp range) with this simple circuit? Your resolution depends on the time you have for charging the cap. If you use a 16 bit counter, that will be you resolution. On the repeatability side, you can improve it by using one of the output as a reference to calibrate your reading. I've tried it once, and it worked so well that decided to never use a PIC with the A/D onboard again if I can help it. There is (of course) a catch. In time critical software you'd have a hard time to fit it into your timing constraints. If you go the whole hog and imlement a 16 bit AD with calibration, you'll need some 16 bit maths too. -- Friendly Regards Tjaart van der Walt mailto:tjaart@wasp.co.za _____________________________________________________________ | Another sun-deprived R&D Engineer slaving away in a dungeon | | WASP International http://wasp.co.za | | GSM and GPS value-added applications | | Voice : +27-(0)11-622-8686 | Fax : +27-(0)11-622-8973 | |_____________________________________________________________|