All of the control registers for UART1 are in the access bank so you can get away with not using banksel to get to them.
UART2 registers are in a different bank (bank 14, 0x0E99-0x0E9F) so you have to load the BSR (ie BANKSEL RC2STA) to access them.
You can still use UART1 but assign it to different pins with the PPS... that would be a lot easier (and smaller) than adding all the code to get at UART2.
Bookmarks