data integrity check when transmitting rs-485

Hello everyone, you can give me advice on how to get the correct data to transfer to rs-485, sometimes some garbage appears

you can give me advice on how to get the correct data to transfer to rs-485

Sure thing. Write proper code. It really is as simple as that.

sometimes some garbage appears

Happens on this forum quite often. People ask questions that involve software and hardware, but fail to provide ANY useful information.