Hi, there. Im currently working on a project, to build an PWM controlled Inverter. Principal of operation: I use a 50Hz sine wave as reference, compared with a 100KHz saw-tooth, which produces my PWM pulses. I'm using an primary center-tapped transformer with 2 power MOSFET's which is controlled by the Logic circuitry. Now the logic circuitry is basically 2x 3-input AND gate's (one to drive each MOSFET in turn. One of the input's is connected to the PWM signals, the other is connected to Inverter Trip condition, and the other is connected to an polarity detector which basically senses in which direction the current should be flowing. Anyway what it all actually comes down to, is that I need a O-crossing detector which will determine, which MOSFET should be switched on when. Thanks.