2015-10-05 10:42 AM
Hello,
my name is Carlo. I'm a student new to STM32 and MCUs in general.What I'm trying to do is to send a 16-bit ADC value through USART to PC, using stm32f0. I found some troubles doing this since USART takes one byte each time whilst ADC1ConvertedValue is 16-bit. I've tried to split a 16-bit value into two bytes but i don't know how to rejoin them to show the actual 16-bit result in the PC.Does anyone have any suggestions ?Thank you very much in advance.Regards,Carlo. #adc #usart #stm32f02015-10-05 11:07 AM
So further presuming little/no PC or C programing experience.
Why then not just output the values in ASCII, with sprintf(), or itoa() type functions, and sending the string of bytes to the PC Terminal application in a human readable form?{ char String[16]; sprintf(String, ''%d\n'', ADCValue); USART_SendString(USARTX, String);}2015-10-06 02:47 AM
Thank you very much Clive1. Your help has been really useful !