David VanHorn wrote: > > > > >First, are you charging and discharging through > >separate pins? They may have different properties. > > I am charging through the same pin, discharging through different pins, and > measuring with two of three pins. > In the AVR, I could measure through the same pin I'm discharging with, and > then I could do all the measuring on one pin. > > >The PIC output low (current sink) saturation > >voltage varies with current. By varying resistances > >there is a variance in current and also discharge > >curves. The output sat curves are in the datasheet. David, at the risk of sounding like a "bucket engineer" have you thought about just measuring your results and then using a lookup table?? Problem solved, and the real world approach also compensates for all the other variables that affect it. :o) -Roman -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads