Hi guys,

How can I measure the phase angle difference between a sine wave and a triggered pulse?

I thought about doing it like this

Loop:
t_sine = time between sine wave peaks.
t_pulse = time pulse is detected
phase angle = 360 x (t_pulse / t_sine)
reset time when phase angle calculated
Goto Loop

I'm not sure how can I measure the times accurately? The frequency of the sine wave is in the order of 50Hz. Is there a better way of doing this?

thanks

M.