Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[PIC] Measuring time between two rising edges

Status
Not open for further replies.

denujith

Member level 5
Joined
Oct 5, 2010
Messages
85
Helped
6
Reputation
12
Reaction score
6
Trophy points
1,288
Activity points
1,886
I have two square wave signals and I want to measure time between a rising edge of first signal and rising edge of second signal which comes after first signal's rising edge.

I can XOR the signals so that it will produce a square wave having pulse width equal to what I want. But it will costs me some space in PCB and increase the complexity. (I could not find a through hole 2-gate IC)

Can anyone suggest me a method to achieve this?

Lakmal
 

Are you using microcontroller in your circuit ? If yes and if the MCU has two external interrupts pin then you can feed the two signals one to each interrupt pin. When first signals rising edge is detected a timer is started and when 2nd signals rising edge is detected then timer is stopped. The elapsed time between the rising edges of the two signals are calculated from the timer value.
 
If this latency is fairly small (xx ns) even a typical XOR gate might be adding error as the latency is not identical for each polarity. But with care, a high speed XOR can be selected.

But then you need an analog or digital method of measuring the pulse widths.

Improve your question by defining the range, resolution and accuracy required in latency measurement.
You can also save a lot more space by learning how to use SMD parts.
 

Thanks for your replies. I am measuring two signals having frequency in between 45Hz - 55Hz. I would expect ±100µS accuracy.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top