This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How to synchronize PWM with external event

As for dimmer applications neccessary, a pwm signal with variable duty-cycle must be generated to drive a triac. But to be synchronized with the mains' zero crossing, the pwm cycle must be started by a GPIO event from a zero-crossing sensor (optocoupler). What would be the best approach to solve this problem? Has anybody done a similar thing before?

Related