cancel
Showing results for 
Search instead for 
Did you mean: 

how can I take input from function generator to the STM board's ADC and check the digital values at

Akshay_
Associate II

I have STM32F series board and I'm using the ADC how can I give the input from a function generator to the board and get the digital output values on the STM32Cube IDE
PS: I'm using STM32cube IDE 1.7.0

1 REPLY 1
Ghofrane GSOURI
ST Employee

Hello @Akshay_ 

First let me thank you for posting.

A function generator is a device that can produce various types of electrical waveforms, typically in the form of analog signals. These waveforms can include sine waves, square waves, triangle waves, sawtooth waves, and more. The output of a function generator is typically in analog form so to read analog input using the ADC on an STM32F series board and obtain the digital output values on the STM32Cube IDE, you can follow these steps:

1- Set up the ADC peripheral: Initialize the ADC and configure its parameters such as resolution, sampling time, and reference voltage

2- Configure the GPIO pin: Enable and configure the GPIO pin that will be used as the ADC input. Typically, you will need to set the pin as an analog input in the GPIO configuration.

3-Start the ADC conversion: Start the ADC conversion process by configuring the ADC channel to be used, triggering mode, and conversion resolution. You can trigger conversions manually or use a timer or external trigger source.

4-Read the ADC value: Once the ADC conversion is complete, read the converted value

Please Take a look at this Link as a source of inspiration.

Thx

Ghofrane