You're asking two different things:
1) Synchronize 2 signals
2) First rising edge should be the same.
Which is it?
If you are trying to SYNCHRONIZE two signals, you can use any number of synchronizers, e.g., 2-flip-flop synchronizer, etc.
But, I'm not sure what you mean by "the first rising edge should be at the same time". If event "A" occurs before event "B", then you could latch "A" and then clock it out with "B". I think you need to be more specific.
You could synchronize the two rising edges at one point in time, but not all all the edges obviously, since the two signals are at different frequencies.
So what, exactly, do you want?
You could synchronize the two rising edges at one point in time, but not all all the edges obviously, since the two signals are at different frequencies.
So what, exactly, do you want?
They are generated by 2 different PCBs. One is 1MHz, the other is 6MHz. They have slight phase difference. I'd like to synchronize them to see a period 1MHz signal with 6 periods of 6MHz signal and add them together with summing amplifier.
Unless the signals are derived from the same master clock, they'll also show a frequency difference, respectively varying phase difference.
It's not clear yet which information is carried by the signals. "Rising edge" (post #1) suggests digital signals, "add them together with summing amplifier" makes only sense for analog signals. In the latter case, digital synchronization methods as previously discussed aren't applicable.
Unless the signals are derived from the same master clock, they'll also show a frequency difference, respectively varying phase difference.
It's not clear yet which information is carried by the signals. "Rising edge" (post #1) suggests digital signals, "add them together with summing amplifier" makes only sense for analog signals. In the latter case, digital synchronization methods as previously discussed aren't applicable.
- - - Updated - - -
O.K., square waves. What could be the purpose of summing them?
- - - Updated - - -
I keep the reservation mentioned before. If both signals don't have exactly same frequency (= derived from a common master clock), continuous synchronization isn't possible, respectively involves phase jumps.
Here's another possible approach:
Use a D Flip-Flop with the 1MHz clock going to the D input and the 6MHz clock going to the CLK input.
The FF Q output is then the 1MHz clock with its rising (and falling) edge synchronized to the 6MHz rising edge (differing only by the FF clock to output delay).
This assumes a positive clock edge triggered FF such as the HC4013 or HC74.
Here's another possible approach:
Use a D Flip-Flop with the 1MHz clock going to the D input and the 6MHz clock going to the CLK input.
The FF Q output is then the 1MHz clock with its rising (and falling) edge synchronized to the 6MHz rising edge (differing only by the FF clock to output delay).
This assumes a positive clock edge triggered FF such as the HC4013 or HC74.
To minimize any effect of metastability you can use the two flip-flips in the 74HC4013 or 74HC74 package in series (simulation below).
Thus even if the first flip-flop becomes metastable, it likely will be cleared before the second flip-flop changes state.
The only change in the signal is that the 1MHz signal is delayed by an extra clock-pulse, but that shouldn't be a factor in this application as the edges are still coincident.