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.

[SOLVED] time between two signal changes

Status
Not open for further replies.

Momos1989

Junior Member level 2
Joined
Sep 26, 2012
Messages
24
Helped
1
Reputation
6
Reaction score
1
Trophy points
1,283
Activity points
1,439
Hi everyone!
I need your help. I want compute the difference of time between two events ( the time that seperates the changes of two signals)

A _________--------------__________
B __________________----------------__________
.................. |<---t--->|

Thank you in advance.
 
Last edited:

Start an up-counter from zero when the first event happens. When the second event happens stop the counter.
The counter value multiplied by the clock period is the answer.
The clock frequency will determine the accuracy and the resolution.
 

Send signals into scope, trigger on first posedge. Twiddle with knobs and read out the time difference.

Fits the problem description, so problem solved. ;-)

Other than that, pretty much the counter with start/stop on event...
 

I'm working on an asynchronous problem! so I can't work with this solution! :/
 

Without a clock, you have no base time reference, so you wont know how long a signal lasts
 

I'm working on an asynchronous problem! so I can't work with this solution! :/

Care to spend some time explaining the actual situation? Otherwise it's just a guessing game as to what solution is applicable.

Or you could use a dual mixer time difference method. You can get pretty precise results that way. Oh wait, also does't fit your unwritten requirements? Curses!
 

Momos1989,

You post reads like a statement, not a question.

"I want to go to the library"

What is the problem then?

Is it that you don't know where it is? Then we'll need to know where you are starting from. And maybe the type of library you're looking for.

Or maybe you know where the library is, and just need a lift.

So give us some more data about your requirements. Are you trying to design something that measures time, or test that two signals have a particular time?
 

Hi everyone! and thank you for your answers! Well I found the solution for my problem.
It's the keyword "now", when this keyword is affected to a variable of type time ( T<=now) it gives you the current moment,
so what I do is T1<=now and when the second signal changes I made T2<=now . So the difference is T2-T1. :)
 

Hi everyone! and thank you for your answers! Well I found the solution for my problem.
It's the keyword "now", when this keyword is affected to a variable of type time ( T<=now) it gives you the current moment,
so what I do is T1<=now and when the second signal changes I made T2<=now . So the difference is T2-T1. :)
Are you planning to use this in real hardware (FPGA) ?
Your "solution" will only work in simulation, it is not synthesizeable.
 

Next time specify VHDL/Verilog and simulation/synthesizable
 

the time of signal equal time of hight lever signal plus time of low lever signal. time of hight lever more than time of low lever, capaciti of signal is small.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top