Hi Nigel,
Thanks for the reply.
Will I still need an XOR gate for this?? I mean I can just wait for signal1 to get high, start counting till I get next rising edge on signal2 [exactly what Pommie did in the previous post].As the signal always lags, detect the start of the reference pulse, then start counting while you wait for the start of the following pulse.![]()
Thanks again Nigel.
<EDIT>
Nigel,
I have found this diagram from a website [attached]. The only other way to find the phase diff of 180+ is that if you look at the signal2 or RX signal waveform and XOR output waveform together [in the diagram], for the phase diff between 0-180, when the signal2 [delay signal] rises, the XOR output is low. For example, for the case of 45 deg, as the signal2 rises, the XOR output is low and for 315 deg, as the signal2 rises, the XOR is high.
Am I right in assumin that if I use a bit test for this case, I can fix the problem??
Lastly,if we feed the XOR output to PIC, will I be using counter to find the width of the signal?? If so then wouldn't the counter value be varied? I mean say for 45 deg of phase diff [for 1000Hz signals] the counter will give 'x' value and for the same phase diff [now for 10 kHz signal] the counter will give less than 'x' value?? So if I read the counter value on the output, I will not b getting the same 45 deg value!
I am so so sorry I sound a bit annoying but I need your kind help on this matter.
Thanks again for your time Nigel.

Reply With Quote
. Please enlighten me.
