Skip to main content

Check Your Understanding 3.1.7 Check Your Understanding

1.

The three consecutive LOW bits (D3, D4, D5 = 0) in Figure 3.1.2 are indistinguishable from a single long LOW pulse if you don’t know the baud rate. What is the only way a receiver can correctly count them as three separate zero bits?
  • By sampling the wire at exactly the agreed baud rate (once per bit period) so that each 104 µs window is counted as one bit regardless of whether consecutive bits have the same value.
  • Correct. This is precisely what “asynchronous” means: there is no shared clock, so both sides must independently maintain the same rate. Any drift causes bits to be miscounted from that point on.
  • By detecting voltage transitions: the line changes level at each new bit.
  • Consecutive identical bits produce no transition at all. A receiver that relies on transitions cannot count repeated 0s or 1s correctly.
  • By measuring the total duration of the LOW pulse and dividing by a standard minimum bit width.
  • There is no standard minimum. Bit width depends on baud rate, which varies across devices. Without knowing the agreed rate, the duration alone tells you nothing about the number of bits.

2.

Could you design a working UART protocol that uses a start bit and 8 data bits but no stop bit? What happens when sending two consecutive bytes where D7 of the first byte is 0 (LOW)?
  • No. Without the stop bit the line stays LOW after D7 = 0, so there is no HIGH-to-LOW falling edge to signal the start bit of the next byte. The receiver never sees the second byte begin.
  • Correct. The start bit is detected as a falling edge. The stop bit’s sole job is to guarantee the line returns HIGH so that falling edge is possible.
  • Yes. The gap between bytes is enough for the receiver to reset.
  • There is no guaranteed gap in a continuous UART stream: bytes can follow immediately one after another. The stop bit is the only guaranteed return to HIGH.
  • No, but only because the hardware requires it. There is no fundamental protocol reason.
  • There is a fundamental reason: start-bit detection depends on a falling edge, which requires the line to be HIGH first. The stop bit provides that guarantee.

3.

If the STM32’s TX pin is labeled “transmit,” which pin on the laptop’s USB-serial adapter should it connect to, and why?
  • The laptop’s RX pin, because TX on one device must connect to RX on the other: data sent by one must be received by the other.
  • Correct. TX → RX is the fundamental UART wiring rule. Connecting TX → TX puts two drivers on the same wire and neither device receives the other’s signal.
  • The laptop’s TX pin, so both ends agree on the same direction.
  • This is the most common wiring mistake. Both devices would be transmitting on the same wire with no one listening.
  • Either pin: UART is symmetric.
  • UART is asymmetric: TX and RX are separate pins carrying traffic in opposite directions.