UART code complete