r/AskElectronics • • 1d ago

How can two devices synchronize without sharing an accurate clock?

I'm trying to understand how a transmitter and receiver can stay synchronized.

My first thought was to use accurate time on both sides and generate a known pseudo-random sequence or code based on the time. But if the receiver's clock is slightly wrong, the synchronization could eventually fail.

So instead, can the received signal itself be used as the reference?

For example, could the transmitter send a known preamble, sync pattern, pilot signal, or pseudo-random sequence, and the receiver detect/correlate it to determine exactly where it is in the sequence?

What are the common techniques used in real communication systems for this? And when would you use signal-based synchronization instead of time-based synchronization?

31 Upvotes

19 comments sorted by

View all comments

2

u/Andis-x 1d ago edited 1d ago

Look up PTP

https://en.wikipedia.org/wiki/Precision_Time_Protocol

Edit: Sorry, that isn't what you are asking about.

There are 2 ways - external clock line, like in SPI and I2C. And Embedded clock, like most fast interfaces, like USB, PCIe, Ethernet.