David VanHorn wrote: > > > > >Repeatability is about +-2 percent. > > Not from where I sit.. > > I'm working on this, and not having much luck with it. > I tried 1-15k resistors, and got horrible non-linearity below about 10k. > Now using 10-150k, I'm getting jitter on the low threshold that's munging > the time by a factor of 2 or more. > > Tried 0.1uF, and 0.01uF, no particular difference other than scale. > > I'm using the MPLAB-ICE, and four channel DSO to diagnose. (Yes I factored > in the probe resistance). > > My biggest frustration is that the discharge dosen't seem to be stable to > more than about 0.5V, and sometimes dosen't detect till as near to zero as > I can see. Hi David, maybe you should try a much smaller cap for faster discharge. I remember Jinx posting about problems with the PIC threshold levels when the voltage changed too slowly. Other than that maybe restructure to just one resistor and one cap and one PIC pin and so some testing that way. Remember the PIC pins are tied internally as "ports" with limits for total port current and stuff, they may have weird effects on each other's threshold levels etc. Just fishing! :o) -Roman -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body