我很难理解这个 UART 时序图是如何工作的。据我了解,C ascii 是十六进制的 43H,二进制是 0100 0011,所以他们是先放低位然后放高位吗?又名 0011 0100?如果是这样,为什么它在图表上倒退?而不是 0011 0100 而是 1100 0010
2 回答
对于 RS232,首先发送最低有效位。这可以追溯到简化非常旧的电传打印机中的硬件。
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.