Hello forum members,
Suppose I'm working on an embedded system project where I need to measure and display a voltage range of 0 to 12 V DC on a serial terminal. I'm using a 12-bit ADC for voltage measurement, and my UART is configured for 8N1 at a 9600 baud rate, meaning it can only send one byte of ADC data at a time.
This formula will give the voltage in the 0-12 V DC range based on the received byte.
I'm facing difficulties in figuring out how to send full 12-bit ADC value via UART.
Any suggestions on how to accomplish this without using sprintf and string.h library?"
Suppose I'm working on an embedded system project where I need to measure and display a voltage range of 0 to 12 V DC on a serial terminal. I'm using a 12-bit ADC for voltage measurement, and my UART is configured for 8N1 at a 9600 baud rate, meaning it can only send one byte of ADC data at a time.
This formula will give the voltage in the 0-12 V DC range based on the received byte.
Code:
voltage = (received_byte * 12.0) / 255.0
Any suggestions on how to accomplish this without using sprintf and string.h library?"