Go Down

Topic: integer through uart with Ascii terminal  (Read 163 times) previous topic - next topic

ronvais

hey
im trying to send uint8_t integer from a sensor to the uart and transmit it
the terminal is decoding the data as ascii so i tryed to typecast it but it doesnt work

                x_ax = (unsigned char)sBuf[0];
      USART_Transmit('x');   
      USART_Transmit(' ');
      USART_Transmit(x_ax);

where x_ax is unsigned char and sBuf is uint8_t

please help me get this working!
 :smiley-roll-sweat:

wvmarle

Problem is almost certain on the terminal side. UART sends raw data, no types or whatever. You have to get your terminal to understand what to do with your data.
Quality of answers is related to the quality of questions. Good questions will get good answers. Useless answers are a sign of a poor question.

Go Up