Skip to main content
Kss.1
Associate II
September 9, 2020
Question

STM32F746 board ADC value LCD display

  • September 9, 2020
  • 1 reply
  • 1654 views

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();

}

This topic has been closed for replies.

1 reply

Ozone
Principal
September 9, 2020

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