Try the analog memory trick with CMOS gates or an opamp. The floating capacitor can hold charge for a minute or more if care is taken. By care I mean that the charge/discharge paths are to be buffered with a suitable bipolar trz. connected such that it does not leak when the power is off. The CMOS sense input can be connected through a very large value R like 4.7M (this is whay it has to be CMOS). Peter -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu