This question already has an answer here:
- Detecting start bit in software UART 3 answers
I understand that it is common for a UART scheme to use 8N1, meaning 1 start bit, 8 data bits, and 1 stop bit. Something like this:
Where 0 is the start bit, the x's are the data, and 1 is the stop bit. In the case of multiple frames being sent back to back continuously, you'd have something like this:
My question is: how can the receiver tell the difference between the start/stop bits and data bits? To illustrate this point, suppose that the data byte 0xAA is over and over. This would look like:
I made the start/stop bits bold for emphasis, but it seems to me there really is no way to distinguish these from the data bits.
Sure, if the receiver has had a solid error-free connection to the transmitter since eternity past, then I can see how this wouldn't be a problem. Or if the bytes are not sent back to back then it wouldn't be a problem. But I've worked with 8N1 circuits that were continuously transmitting bytes one after another, and I could disconnect/reconnect the wires mid-transmission and the receiver would always jump right back into receiving correctly. How is this possible?