> > Hi, I heard somebody did use PIC direcly measure the capacitance by get > > discharge time. Is there other more accurate way to directly measure > > capacitance ? I try to interface PIC directly to the capacitance > > sensor (it changes from 60pF to 70pF). > > > No problem. Thats how I read a PC joystick in my servo controller. Charge > the cap through the pot on the joystick and see how long it takes to go high, > flip the port & discharge it, repeat. I was dealing with 1-100k & 50nf, but > that shouldn't matter too much just work out the TC of some RC network until > the variation meets you resolution requirement. A 555 solution is of course > trivial, and probably easier given that your only an order of magnitude above > the C of the pin itself. Maybe not so easy. I don't remember PIC specs exactly, but for 555, 74121, 74123,4046, NE567 lower value for capacitane is about 50-100 pF. So I suspect, that PIC has similar usable limit. Near this limit you should expect troubles with parasitic capacitance, nonlinearity, etc. LC generator is probably the best for this. There may be problem with stability of coil inductance. Jaroslaw Lis +------------------------------------------------------------------------+ | E-mail (Internet): | Institute of Engineering Cybernetics | | jjlis@ict.pwr.wroc.pl | Technical University of Wroclaw, Poland | +------------------------------------------------------------------------+