Does the PIC16f877 input to the a/d converter work on voltage or current, or do both. For example if I had 5volt input to the a/d converter would the digital represntation for an 8bit converter be 256 and for 2.5volt be approx 128. Dean Matthews Reliability Engineering Ford Engine Plant Bridgend South Wales, U.K Tel No:(01656)672597 Fax No:(01656)672558 Email: dmatth14@ford.com ` Please consider your environmental responsibility before printing this e-mail -----Original Message----- From: Dan Michaels [mailto:oricom@USWEST.NET] Sent: 27 August 2001 15:40 To: PICLIST@MITVMA.MIT.EDU Subject: Re: [PIC]: High impedance inputr to PIC A/D Lawrence Lile wrote: >DING DING DING DING DING! A WINNER! > >Bob, you get the "THE BEST DESIGN HAS ZERO PARTS" award for approaching that >lofty ideal most closely. What a good idea! > Hi Lawrence, at first I thought so too, regarding Bob's solution. However, as Harold pointed out, the leakage current out of the pin - whether configured in analog or digital mode - is going to run into the high source impedance and ultimately charge the cap to an incorrect value. Bob's switching method is not going to change this. The spec shows [digital] I/O ports have a max leakage of +/-1 uA. 1 uA * 2M --> 2v offset, cap or no cap. High source impedance only works accurately with truly "tiny" leakage currents. best regards, - dan michaels www.oricomtech.com ======================== -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details. -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu