UART protocol implementation