That is the cheapest way of doing it. You need a comparator (opamp) - one input takes the incoming signal the other is connected between the resistor and capacitor. However, in order to keep the charge time linear, limit your input to the comparator to 1 volt (0 - 1), feed the RC network from a PIC pin (+5V), start counting (might as well use the full byte on the internal counter...) as soon as the RC pin is taken high and stop counting when the comparator output changes (another pin for that), then drop the RC pin back to zero and allow time for the RC network to discharge before sampling again. Y Boa Sorte! Antonio. > I need to design the cheapest A/D converter using 16F84. I'm thinking > in just a resistor and a capacitor, and measure the charge time. > The input voltage will be from 0 to 5V and 6 bits of resolution is enought. > Any ideas? > > Regards, > > Octavio > ====================================================== > Octavio Nogueira - e-mail: nogueira@mandic.com.br > http://www.geocities.com/~oct_nogueira > "ProPic" Production PIC Programmer Windows under US$20 > ====================================================== > >