Convert digital signal to UART and visa versa
Thank you all for the answers.

IrDA mode is the easiest solution in hardware, provided by @Ben Voigt, 

I started looking into IrDA, and found the hardware solution that works! The microcontroller that I am using supports USART-IrDA, for me it was necessary to invert the signal set oversampling to 8 and the pulse width to 4/8, to get the required 50% pulse width.