Hi everyone
I need to detect the second rising edge of this signal (it's an entry)
i've tried several ways but without succes
how do i do that ?
thanks
Hello ,
just to make sure , you want to detect every second rising edge ? or the second edge in the 6 pulses train ? also does the display start from right to left ? cuz where u point is a falling edge
Regards
your picture is misleading - it points to falling edges.
And at what point does an edge become a second rising edge? every second one? or second one after a given input?
If I understand your problem correctly:
Set a timer after each falling edge to time when the next middle of a high bit should occur in the normal input sequence. If you then sample a low you know you are in the gap between the input sequences. Then just count the number of rising or falling edges to detect the one you want.
To detect the edge, you can just register the signal with multiple back to back registers. For rising edge, you can just check for reg [n] & ! reg [n-1]