Would you mind giving me a hint of what or where to look to understand how to shift the input as you mention below? Kind regards, Lindy > > After properly amplifying the input signal, run it through a Schmitt > trigger (comparator). For such a simple circuit you don't have to use a > bipolar supply, so you probably won't. Which means that you may amplify > your input signal and shift it so that 0 input is at, say, 2.5V. Then you > put your comparator threshold at 2.5V. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist