Thanks!!
I have been beating myself silly trying to get the USART to transfer my message. Nearly one week on Microchips forum and nobody could answer this. I doubt I would ever see you in the states but I owe you a beer THANKS!
Yep... the char buff[] is a RAM pointer to a char, and the = {"Hello"} tells the initialisation code to copy "Hello" from ROM space into RAM space for you. Your usart_str is (implictly) expecting a RAM pointer.
When you try usart_str("Hello") the compiler is putting "Hello" into ROM as it did for you previously, but is NOT doing the copy into RAM space. You would need to write a version of usart_str that took a (rom char *) pointer which read the ROM space char into a RAM variable to pass to write_usart()
Good to read both Section 5 of the Data Sheet, and section 2.4 of the C18 User's Guide.
P.
I have been beating myself silly trying to get the USART to transfer my message. Nearly one week on Microchips forum and nobody could answer this. I doubt I would ever see you in the states but I owe you a beer THANKS!