Thank You Anobium!! It works! How did you find it? Where did you look? BR Mike
Just checking RC0 again. Sub InitPPS UNLOCKPPS RC2PPS = 0x16; //RC2->EUSART2:TX1; swapped RC0PPS = 0x13; //RC0->EUSART1:TX2; So I swapped the 0x13 and 0x16. Now the "USART1" message comes out of Port RC0 instead of RC2. No action on RC2. I am swapping them back.
In the above assembly, I just realized that it don't have to go through line 208. Comport is 2 when HSERSEND345 routine is called and then the SELECT sends you to "SysSelect1Case2" , so it should work! Iam at a loss for the how this piece of code in USART.H works though. #ifdef Var(TXREG2) //~WRITE THE DATA BYTE TO THE USART //~ Sets register to value of SerData - where register could be TX2REG, TXREG2 or U2TXB via the #samevar #IFDEF VAR(TX2REG) TX2REG = SerData #ELSE TXREG2 = SerData #ENDIF How...
The the .asm file banksel TX1REG movwf TX1REG HSERSENDUSART2HANDLER goto SysSelectEnd1 SysSelect1Case2 movlw 2 subwf COMPORT,W Line 208 goto SysSelectEnd1 ,looks like it prevents getting to the 2cd USART.
I have done some experimenting. I have chosen 2 other pins for TX2 output 16. No output I chose DT2 output 18 and it send a bunch of 0's. so the pin is functional. USART 1 continues to function. So UART2 is NOT putting out anything which points back to programming or setup of USART2?? M
PPS messed up?? I have to go and pickup my wife. Be gone for a bit.
I added the "DIR" statement and it made no difference Prints USART1 out of the USART2 port Pin RC0
Slight edit on your test2 program "USART2", 2 But it prints USART1 out of the USART 2 Port and nothing comes out of the USART1 port. Don'r we need the "Dir" statements?? This is what I want: RB5 is RX1 RC2 is TX1 RC1 is RX2 RC0 is TX2 That is what is in the PPS!