How to synchronize the clock of the signal receiver?

Let's say I get a binary signal in digital form, where a logical "1" is transmitted as the presence of a signal, and a logical "0" is the absence of a signal.

The duration of the logical “1” is the same as the logical “0”, but the transmitter clock can drift, slightly differing by 1 or 0. The maximum number of consecutive 1 or 0 can be transmitted.

In computer programming code, what is the general algorithm for this? How to synchronize the receiver clock to adapt drifts? What should be the minimum sample rate of the signal?

+3
source share
3 answers

( ) () 0 1. 0 t/2 t/2 t 0 ( 1) t - . .

: . wiki http://en.wikipedia.org/wiki/Self-clocking_signal

+2

NRZ (), .

, , . , 2 , .

, .

0

RS-232.

, , ( ), . , , 0 1 , (, ). , , , - / 1 , .

This way you reset the error between your watch to zero every so many bits, making sure that it does not accumulate and does not cause problems. On the Wikipedia page, asynchronous serial communication talks about what I just said in much more detail.

0
source

All Articles