as shown in the figure

.

.

Digital phase meter using microprocessor .