0

I'm struggling to understand how this UART timing diagram works. From my understanding C ascii is 43H in hex and in binary it is 0100 0011, so did they put the lower bit first and then the high bit? aka 0011 0100? If that's the case why is it backwards on the diagram? instead of it being 0011 0100 its 1100 0010

enter image description here

Malinator
  • 113
  • 1
  • 1
  • 5

2 Answers2

3

For RS232, the least significant bit is sent first. This dates back to simplifying the hardware in very old telex printers.

David Schwartz
  • 179,497
  • 17
  • 214
  • 278
  • Okay so the least significant bit goes first but why is it backwards on the diagram instead of it being 0011 its 1100 – Malinator Nov 29 '16 at 23:35
  • 1
    There's one bit off in the diagram. They have 0_11000010_11 and it should be 0_11100010_11. (Maybe the parity bit is off too!) – David Schwartz Nov 30 '16 at 00:13
0

I'm struggling to understand how this UART timing diagram works.

Apparently you're referring to the logic output of a UART, i.e. the TxD pin.
It's not a RS-232 signal, since the voltage and logic levels are TTL.

so did they put the lower bit first and then the high bit?

The least-significant bit is transmitted first (after the Start bit, a logic 0).
The most-significant bit of data is last, followed by the optional parity bit and 1, 1.5 or 2 Stop bits (at logic 1).

... aka 0011 0100?

No, that is not the reverse bit string.
All you have done is swap the nibbles (i.e. half bytes).

If that's the case why is it backwards on the diagram?

There's nothing wrong with that diagram.
The data bits in that diagram are correct for 01000011 or 0x43 as eight bits of data with even parity.

... instead of it being 0011 0100 its 1100 0010

1100 0010 is the reverse bit order of 01000011.
You're just trying to swap the nibbles, which is something completely different.

sawdust
  • 16,103
  • 3
  • 40
  • 50