Zero crossing using PIC18F45K50


Joined Apr 24, 2011
Going digital is the better way to detect zero crossings as it is as fast as you can get with little overhead. Danny's circuit shows how few components are needed, and it may be done with fewer if you are most careful in selecting the pin for no analog functions and both hi and low ESD diodes.

Additionally, if you choose a pin with an interrupt on change it could detect both edges by the nature of both being a change.