N STEENKAMP [M.ING E&E] wrote: > > > Gerhard Fiedler wrote: > > > > > > At 20:03 19/05/97 +0300, Jussi Vainionp wrote: > > > >Microchip application note AN513 describes a method for ADC. > [SNIP] > > > > > Why not charge a cap and measure time-to-trip on an input? You only > > need a cap and two resistors. > > You would want the cap to charge with a constant current proportional to > the voltage you want to digitize. This will give you a linear voltage > charge curve across the cap. Else you will get the normal exponential > RC curve. One can of course try compensating for this in software, but it > would be complicated. > So you would need a voltage to current converter as well. This can > easily be done by an OPAMP. > If I'm not mistaken this kind if conversion is called a single slope > integrator, or something like that. It can be quite accurate, but is > slow. > > Regards > Niki I recently used this configuration a single opamp and two port pins.one port pin discharged the cap via a mosfet the other was an input pin. I found that there is a minimum charge time for the cap so you cannot get a clean 0 to 255 count. If you introduce a delay after releasing the shunt and before counting it helps but is counter productive. If you count to fast you rollover the counter and etc.. I would personally suggest using the dual slope method as it allows for some of the problems without reducing utility.However if you can restrict your requirements to something less than the full 8 bit resolution the repeatability and drift are negligible and the components are certainly cheap enough. Tony M.