My preferred technique is to use a transformer to derive the 5V for my circuit. Use a votage divider to feed the raw stepped down AC to a pin on the PIC for zero cross detection. The code uses the zero cross interrupts to execute whatever it is that I need to do, like a phase control.
Bookmarks