>In analog electronics, this could be done by low-pass filtering the >signal, AC coupling it, and applying a zero-crossing detector with >some hysteresis. You can do the same thing digitally, assuming >the frequency isn't too high. This would require another input pin, however. --Andrew _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu