Introduction
Hello, I'm Guu. It's spring on the calendar, but I'm still shivering in the cold.
This time, I will talk about serial communication using UART.
What is UART (Universal Asynchronous Receiver Transmitter)?
A communication circuit that converts serial signals to parallel signals, and vice versa, converts parallel signals to serial signals.
There are some words here that I don't understand.
What exactly are "serial signals" and "parallel signals"?
These are signals (data) exchanged in serial or parallel communication.
I don't really understand even if you say that, so I will explain how serial communication and parallel communication differ below.
About serial and parallel communication
Serial (continuous) communication is...
It is a communication method in which characters are conveyed in order in a vertical line.
To be precise, 1 bit of data is sent in 1 clock.
Note: One square in the above figure is regarded as one bit
On the other hand, what is parallel communication?
It is a communication method in which characters are conveyed in a single horizontal line.
More precisely, the number of bits sent in one clock is 2 or more (e.g. 8 bits).
(The number of bits that can be sent and received in one clock depends on the environment.)
Note: One square in the above figure is regarded as one bit
Looking at it this way, don't you think that parallel communication is more convenient than serial communication because it can carry (send and receive) many characters at once?
But! Actually, in the world, serial communication is more mainstream than parallel communication!
I wonder why? ? ?
The key to solving the mystery lies in "speeding up communication speeds."
Why serial communication is the mainstream
Consider parallel communication.
When receiving 8-bit data, all bit data should be received in line as shown above.
But what if the wiring looks like the picture below?
By bending the wire, the length of the wire changes.
Due to this difference in wiring length, the arrival time of data changes subtly,
All bits will not be received at the same timing as shown below.
Note: One square in the above figure is regarded as one bit
If the communication speed is slow (= 1 clock interval is wide),
There is no problem because reception of all data is completed between the first clock and the second clock.
However, when the communication speed becomes faster (= one clock interval is narrower),
It becomes impossible to send all the data in one clock.
With serial communication, data is received bit by bit in order no matter how fast the communication speed becomes.
No problems like parallel communication!
For these reasons, serial communication has become more popular than parallel communication in recent years, as communication speeds have increased.
Summary
The difference between serial communication and parallel communication is the size (number of bits) of data that can be sent and received in one clock.
Serial communication is becoming mainstream due to the increase in communication speed.
Guu's tweet
I'm surprised that the way the wiring bends affects the data transfer speed.
bonus
"Equal length wiring" as a device to equalize the data transfer speed when performing parallel communication
There is a thing called.
By making the length of the wiring equal, all data is sent and received at the same timing.
Surprisingly Familiar Serial Communication
A typical UART is the National Semiconductor 16550A.
In addition, there are RS232C and other standards for serial communication.
Everyone must have seen it at least once!