PIC16F - A Logic Conundrum
This revolves around a PIC16F15323 but the problem isn't too chip specific. I have two CLC's left and no timers though I can make timer2 available and if pushed I can up the chip to get a more.
So imagine if you will a comparator senses an over-voltage condition and disables a mosfet or relay. Once the condition clears the switch should only re-engage when an AC line is at zero-cross (so using the ZDC). You can see this logic at the bottom of the picture.
The problem is the switch is toggling at the AC frequency. What actually need to happen is the logic at the top of the picture.
Let me know if you have any ideas!