I'm guessing this is a reply to my 1st code post which I inadvertently cut the TRIS settings in my (hastily) attempt for reader friendly pruning, but I can assure you every port was set to digital all the time. What's more, the 2nd UART was originally configured to the same pins as the 1st. When my head was too sore from banging against that wall, I switched the 1st UART to those pins and voila, they worked.

Troy

Quote Originally Posted by richard View Post
you don't appear to have set the portb pins used to digital [anselb =$f6]

or not

mcc sets the involved registers like this to match your settings

TRISB = 0xFE;
ANSELB = 0xF6;
U2RXPPS = 0x0B; //RB3->UART2:RX2;
RB0PPS = 0x16; //RB0->UART2:TX2;
U2P1L = 0x00;
U2P1H = 0x00;
U2P2L = 0x00;
U2P2H = 0x00;
U2P3L = 0x00;
U2P3H = 0x00;
U2CON0 = 0xB0;
U2CON1 = 0x80;
U2CON2 = 0x00;
U2BRGL = 0x82;
U2BRGH = 0x06;
U2FIFO = 0x00;
U2UIR = 0x00;
U2ERRIR = 0x00;
U2ERRIE = 0x00;