Everything seems to be fine. And if you receive data on the terminal over UART
the transmission seems to work. But it looks that the dataword from your string is not processed correctly. If you use a function in Microchip Studio
with a pointer i prefer to work with the pointer and not switch to an other notation:
Please adapt your Terminal_SendString
-function as following:
void Terminal_SendString(const char* str)
{
while(*str != '\0')
{
USART0_Transmit(*str);
str++;
}
}
And check it out in your main:
Terminal_SendString("This is a test\n\r");
Also it is possible to send some single chars
and try if they are transmitted correctly:
USART0_Transmit('T');
USART0_Transmit('e');
USART0_Transmit('s');
USART0_Transmit('t');
USART0_Transmit('\n');
USART0_Transmit('\r');
If the single transmission of a character does not work there maybe is a missconfiguration of the baudrate within
UBRR
?!
Please provide me some feedback in the comments if anything is unclear or does not work.