Look for Sigma-Delta conversion. There is (or was) PIC code for this on Tony Nixon's site at, http://www.picnpoke.com It requires one input and one output pin unless you want to be horribly cunning. A capacitor is driven by the input voltage via a resistor and by the PIC output pin via a second resistor. The PIC input is connected to the capacitor. Essentially, the PIC input pin samples the capacitor and decides whether it is "high" or "low" - a one bit Analog to Digital converter. If the capacitor is "high" the output pin is set low and vice versa . The result is that the output pin outputs a series of 1's and 0's whose mean value is proportional to the difference of the input above or below the PIC input pin's 0/1 transition point. A small amount of arithmetic converts this to a voltage reading. The method is slowish but accuracies of 12 bits plus can be obtained. Using a comparator instead of the raw PIC input can help. regards Russell McMahon _____________________________ >From other worlds - www.easttimor.com www.sudan.com What can one man* do? Help the hungry at no cost to yourself! at http://www.thehungersite.com/ (* - or woman, child or internet enabled intelligent entity :-)) >From: Edson Brusque >> I've seen some time ago a document (maybe an application note) telling >> how to do analog-to-digital conversion with a microcontroller that doesn't >> have ADC, using a capacitor, two or tree resistors and two microcontroller >> pin.