cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F746 board ADC value LCD display

Kss.1
Associate II

0693W000003R6mRQAS.jpgDear all

Displaying analog voltage value on TouchGFX GUI using STM32F746G-DISCO kit.

I watched YouTube and followed it.

The ADC input is up to 3.3V, but the value displayed on the LCD is displayed in a very large number. The ADC is 12 bits and the output is 3.3/4096. If it is normal, the maximum voltage should be displayed as 3.3V on the LCD screen, but I can't figure out why such a large value is displayed.

Please let me know what's wrong.

void Screen1View::analogUpdate(uint32_t value)

{

memset(&textAreaADBuffer, 0, TEXTAREAAD_SIZE);

Unicode::snprintfFloat(textAreaADBuffer, sizeof(textAreaADBuffer), "%.3f", value * 0.000805664 ); // 3.3/4096 = 0.000805664

textAreaAD.invalidate();

}

1 REPLY 1
Ozone
Lead II

Try : (float) value * 3.3f / 4096.0f