This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

calculate the time between 2 rising edge

hi can anyone help me i need to calculate the time between 2 rising edge of square wave signal the first signal is relayed with pc10 the second with pc11

that is the schematic :

s14.postimg.org/.../counter1.png

Parents
  • You are aware that a single chronograph can be used to take quite a number of intermediate times when you have a runner doing a 10000m run?

    It's just that you don't seem to have considered yet what it means to either start/stop a timer. Or to have a free-running timer and just take multiple snapshots and compute the difference between the snapshots. So start thinking about how you could use a single clock to both measure the total time that runner needs for 10 km running. And how you can manage to figure out each individual lap time. Or maybe each individual 1km section time.

    You will fail again and again until you stop playing around and start to think about what the timer actually does. Stop thinking that the timer magically starts being in existence the moment you start to sample values. And by the way - you don't even need to capture values continuously within the loop, since it's enough to capture the value directly after you found the condition change that means you want to exit.

    In the end, trial and error really is not a good route since it's so very slow. That's basically what evolution does. So trying millions of small biological changes over hundreds of generations to try to figure out if some changes might lead to an improvement or not. It's just that trial and error (in science also sometimes discussed as Monte Carlo methods) means you need a huge number of dices to be able to test enough random solutions concurrently - just to get some decent progress.

Reply
  • You are aware that a single chronograph can be used to take quite a number of intermediate times when you have a runner doing a 10000m run?

    It's just that you don't seem to have considered yet what it means to either start/stop a timer. Or to have a free-running timer and just take multiple snapshots and compute the difference between the snapshots. So start thinking about how you could use a single clock to both measure the total time that runner needs for 10 km running. And how you can manage to figure out each individual lap time. Or maybe each individual 1km section time.

    You will fail again and again until you stop playing around and start to think about what the timer actually does. Stop thinking that the timer magically starts being in existence the moment you start to sample values. And by the way - you don't even need to capture values continuously within the loop, since it's enough to capture the value directly after you found the condition change that means you want to exit.

    In the end, trial and error really is not a good route since it's so very slow. That's basically what evolution does. So trying millions of small biological changes over hundreds of generations to try to figure out if some changes might lead to an improvement or not. It's just that trial and error (in science also sometimes discussed as Monte Carlo methods) means you need a huge number of dices to be able to test enough random solutions concurrently - just to get some decent progress.

Children