Why do baud rates need to be same in asynchronous communication?
Synchronous communication will have a clock line and a data line. That makes it very easy:


The TX sets the data on the data line and then strobes the clock line.
The RX waits for the clock strobe and then reads the data.


It doesn't matter what the baud rate is and it could even vary during the transmission of a byte, for example.

In Asynchronous data transfer there is no clock. This presents a problem.

Let's say I am going to transmit messages to you using a flashlight. 


We agree that each message will be eight bits (one byte) and 'light' = '1' and 'dark' = 0.
We decide that each byte transmitted will be preceded by a start bit = '1'. (Otherwise you wouldn't know when transmission had started for '00001010' for example.)
We now need to agree the flash (baud) rate. We agree on 1 s per bit.
You watch eagerly waiting for a start bit. When you see the first '1' you wait 1.5 s and then take a reading every 1 s after that.


.

Data bits      S   0   0   1   0   1   1   1   1   Stop
               ___         ___     _______________
Data    ______|   |_______|   |___|               |___________

Read          `     ^   ^   ^   ^   ^   ^   ^   ^


Figure 1. Timing diagram.


The reason for the initial 1.5 s delay is because my clock and your clock are running independently and there could be timing errors. With you taking a reading in the middle of each bit period you can still get a good reading even if your clock is running a little faster or slower than mine. The timing error will accumulate and the last bit would be the worst but with crystal controlled TX and RX circuits even the last bit should be read accurately enough.


If you choose to read my flashes at a different rate than I'm transmitting then you will read garbage.



For transmission the data byte to be transmitted is loaded into the transmit register. On each clock transition the rightmost bit is transmitted and the byte is shifted right. This occurs eight times so that the whole byte is transmitted.

                      TX Buffer           Serial out
TX buffer initial     0 0 0 0 0 0 0 0       
TX data loaded        1 1 1 1 0 1 0 0       
Send start bit                              1
Send bit 0            . 1 1 1 1 0 1 0 --&gt;   0
Send bit 1            . . 1 1 1 1 0 1 --&gt;   0
Send bit 2            . . . 1 1 1 1 0 --&gt;   1
Send bit 3            . . . . 1 1 1 1 --&gt;   0
Send bit 4            . . . . . 1 1 1 --&gt;   1
Send bit 5            . . . . . . 1 1 --&gt;   1
Send bit 6            . . . . . . . 1 --&gt;   1
Send bit 7            . . . . . . . . --&gt;   1
Send stop bit         . . . . . . . .       0


Figure 2. Parallel in. Serial out.

For the receiver, the clock starts after the start bit is received. At the middle of each bit the data is read and shifted into the data received latch. After eight cycles a signal is given to indicate that the byte of data is ready to be read.

                      Serial in     RX Buffer
Receive start bit        1          start the receive timing clock
Receive bit 0            0      --&gt; 0 . . . . . . .
Receive bit 1            0      --&gt; 0 0 . . . . . .
Receive bit 2            1      --&gt; 1 0 0 . . . . .
Receive bit 3            0      --&gt; 0 1 0 0 . . . .
Receive bit 4            1      --&gt; 1 0 1 0 0 . . .
Receive bit 5            1      --&gt; 1 1 0 1 0 0 . .
Receive bit 6            1      --&gt; 1 1 1 0 1 0 0 .
Receive bit 7            1      --&gt; 1 1 1 1 0 1 0 0
Receive stop bit         0          can be ignored
Receive data                       1 1 1 1 0 1 0 0


Figure 3. Serial in. Parallel out.