51 microcontroller serial communication received garbled code

If you have received correctly, there is a problem to send; you can check whether there is an error in the line of TXD which is PIN.

If there is received, but the information is not correct; check whether the value of TH1,TL1 is correct.

Looking at the transmission of 1,2,3 alone, there should be no error!

You can also send a single data such as 1 to see if the single transmission is correct. If the single is correct, then it's a conflict issue!