Could you tell me if 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: Olin Lathrop [mailto:olin_piclist@EMBEDINC.COM] Sent: 24 August 2001 19:38 To: PICLIST@MITVMA.MIT.EDU Subject: Re: [PIC]: High impedance inputr to PIC A/D > B. To use a cheap two-or-three transistor amplifier. I get transistors > three for a nickel, and resistors four for a penny, so any concievable > combination of bipolar transistors and resistors would be plenty cheap. > FETs (the other obvious choice) are probably out of my price range. So far, > I've not been able to get anything to work so well. If you're so far just looking at the voltage from a photo transistor with 2M collector resistor, you obviously don't care about speed or a few 10s of mV offset. In that case you can make a "do it yourself" op amp with a few transistors and resistors. The attached schematic shows what the op amp front end looks like. This is a comparator between the IN and FEEDBACK signals. You will still have to take one of the OUT signals, and amplify it by a large voltage gain, then feed the result back into FEEDBACK. The result will then be a reasonably good replica of the IN signal at much lower impedence. -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu