I want to send, for example, the integer 12345 to UART, and i did it like this:
int integer_to_send = 12345;
While (integer_to_send){
UCA0TXBUF = integer_to_send %10 + 48;
integer_to_send /= 10;
}
All this is inside USCIAB0TX_ISR routine.
So i got 54321 read in my computer's UART port.
How can i get the number in correct order?
Thank you very much for your time!
JM