Hi, atomski

You're a bit hard with me ...

So, you have to create a "rectifier" stage with a bit of analog and logic circuits before the PIC; see:

Consider half of the pulse voltage, and make a, say precise 50µS, positive pulse at each crossing, pos or neg ...

then, you can use PULSIN as it will be "resettable" during the 50µS pulses ... then add 50µS to what you've measured.

Just program what to do if two identical values follow each other ( it's then a phase shift ...)

Cheeeeeese, you're on the pic' !!!

Alain