Olin Lathrop wrote: > If the AC p-p is below 5V, then you have to amplify it before passing it to > the PIC. In either case, you are still subject to sudden spikes in the DC > voltage (your power supply, I presume). I therefore consider this a very > bad way to get a power line clock signal. Not enirely true, if the PIC input is a ST (schmidt) type, the signal has low/high thresholds of 0.2v/0.8v so a 1v peak/peak waveform will work fine. These are worst case figures too. If it is a standard PIC input pin (TTL buffer type) the low/high is 0.8/2.0 volts. There is no need for a 0v/5v signal and it's important to understand this when designing input circuits for the PIC. I connect all sorts of weird analogue signals directly into the PIC inputs and although it borders on bad manners to connect an analogue signal into a non-schmidt pin I have never had a problem. Provided you understand these threshold levels and work on the correct side of them the PIC digital inputs are very reliable. :o) 20 years ago logic chips were very fussy but with modern logic chips all digital inputs have a decent hysteresis and stability and will handle an analogue input well, as long as they are not left "floating". -Roman -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu