Hello All,
Iam using a TM4C123 MCU & Iam trying to send negative numbers via UART. My data is a digital filter output which has both negative and positive numbers . When I use UART0 and send data using
UARTprintf("%d\n", finaldata) The data is sent to PC without any issues as long as Iam doing Serial readline (receiver keeps receiving data until newline char is received) on the PC side.
My data is like in the range of (500 to -500)
But if I break the data in MSB & LSB and send using UART2
UARTCharPutNonBlocking(UART2_BASE,(finaldata & 0x00FF))
UARTCharPutNonBlocking(UART2_BASE,((finaldata & 0xFF00) >>8))
Then the negative numbers are NOT RECEIVED at the Receiver end.
Kindly help in resolving the issue.