Hi Mark
I looked further into this issue, and slightly different the way to access the registers than other processors I have used.
I see to access the UMR1n and UMR2n registers the reset mode register has to point to the UMR1n. I find it strange that when updating any of the UMR1n or UMR2n, the other register also updates with the same value. I tried the following to write and read to the 2 registers.
after the *ucReg = ucBits; line in your code I added the below so I can step through it.
TmpPtr=ucReg ; //when you accessed the UMR1n register I took a copy of the address.
ucReg = fnSelectChannel(Channel);
*ucReg = UART_RESET_CMD_PTR; //reset mode register
ucReg =TmpPtr; //point to UMR1n
*ucReg = 2; //place 2 into the register. In the Register Window the 2 UMR1n and UMR2n changed to 2, which is weird
*ucReg = 3; //place 3 into the UMR2n register. In the Register Window the 2 UMR1n and UMR2n changed to 3, again which is weird
//now read the 2 registers
ucReg = fnSelectChannel(Channel);
*ucReg = UART_RESET_CMD_PTR; //reset mode register
ucReg =TmpPtr; //point to UMR1n
Dta1=(unsigned char)*ucReg; //read UMR1n
Dta2=(unsigned char)*ucReg;//read UMR2n
Now Dta1 and DTA2 was equal to 3, which isnt correct. This isnt what I expected , why is this?
Best Regards
Neil