From c4f67378aed6321ede7ce4b34b095251f30b36af Mon Sep 17 00:00:00 2001 From: Allen Hill Date: Sun, 20 Aug 2023 20:41:25 -0400 Subject: [PATCH] Use alternate UART TxD/RxD pins --- com232.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/com232.c b/com232.c index 7336341..cadedd0 100644 --- a/com232.c +++ b/com232.c @@ -34,6 +34,8 @@ byte readkey; void RS232_Init(void) { RS232_RxCharBegin = RS232_RxCharEnd = 0; + PORTMUX.CTRLB = PORTMUX_USART0_ALTERNATE_gc; // Use PA1/PA2 for TxD/RxD + USART0.CTRLA = USART_RXCIE_bm; // Enable receive interrupts USART0.CTRLB = USART_RXEN_bm | USART_TXEN_bm | USART_RXMODE_NORMAL_gc; // Enable Rx/Tx and set receive mode