4
\$\begingroup\$

UART frame has 1 start bit, 8 bit payload data, 1 or 2 stop bits. Frame structure and baud rate is agreed by both transmitter and receiver for successful data transmission. Start bit is used to synchronize and tell receiver that frame is started. Why there is a need of stop bit per frame, since all data frame to be transmitted will always be 8 bits (frame will always end with 8 bits)?

\$\endgroup\$
14
\$\begingroup\$

(sorry: I am in teacher mode)

What will the line signal look like (without a stop bit) when you transmit a continuous stream of 0x00 bytes? which problem will this cause?

\$\endgroup\$
  • \$\begingroup\$ For 9 bit (1 start bit + 8 data bit), UART lines will be 0 (9 spaces). \$\endgroup\$ – AvadhanaSolutions Oct 17 '15 at 7:37
  • \$\begingroup\$ I think to re-synchronize receiver, stop bit is used \$\endgroup\$ – AvadhanaSolutions Oct 17 '15 at 7:40
  • 6
    \$\begingroup\$ The point is that it will always be 0. Hence the receiver (which can have a clock that differs somewhat from the sending clock) will (after some time) lose track of where the bytes start. Hence 1000 bytes sent could be received as 999 or 1001 bytes. \$\endgroup\$ – Wouter van Ooijen Oct 17 '15 at 8:19
12
\$\begingroup\$

What is used for synchronization is not the start bit itself, but the falling edge between the previous stop bit and the start bit.

Without both stop and start bits, there might not be such an edge.

\$\endgroup\$
  • \$\begingroup\$ There are UART implementations that support half stop bits. \$\endgroup\$ – Simon Richter Oct 17 '15 at 10:24
  • 2
    \$\begingroup\$ Yes, the length of the stop bit state does not matter. \$\endgroup\$ – CL. Oct 17 '15 at 10:28
-1
\$\begingroup\$

It's a holdover from the days of electromechanical teletypewriters, when the time was used to release a clutch in the electromechanical transmitter mechanism. It was carried forward into fully electronic UARTs, perhaps because the original electronic designers didn't understand electromechanical teletypewriters.

Here's a discussion of how the old teletypewriters worked: http://mysite.du.edu/~jcalvert/tel/teletype.htm

\$\endgroup\$
  • 1
    \$\begingroup\$ That's a valid reason for adding extra stop bits, but you always need at least one, as described in the other answers, in order to guarantee having at least one transition in the signal for every byte transmitted, even with back-to-back characters. \$\endgroup\$ – Dave Tweed Dec 16 '15 at 15:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.