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.

How to find out which signal is leading and which is lagging

Status
Not open for further replies.

shahsali

Newbie level 4
Joined
Mar 8, 2005
Messages
7
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,330
Hi

I have to compare 2 signals (A and B) in VHDL and have to find out if signal A is leading then increment counter and if A is lagging then decrement counter.
 

Re: How to find out which signal is leading and which is lag

try to sample both of them with a clock(at rising and falling edges), then compare their values to know which of them have chnge its value b4 the other.
 

Re: How to find out which signal is leading and which is lag

You have to use a clock frequency such that clock period is less than the phase lead/lag time of these signal. after that sample both the signal at rising edge of the clock and whichever signal is high, put a counter and make it lag .. slwoly u will be able to match phase of both...
 

are the two signals some sort of a clock frequency or they are some pure asynchronous signals?? Please elaborate a bit.. thanx
 

... or are they digitized sinewaves?

If the two signals are coming from something like an optical encoder, then search google for "quadrature decoder".
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top