Skip to main content
Associate III
July 30, 2024
Question

stm32cubemx and keil

  • July 30, 2024
  • 3 replies
  • 1569 views

if you want to use ADC to DAC and have 200hz output. what is the first thing to do? connect the ADC to the DAC or set the output frequency first until it reaches 200hz?

3 replies

Associate III
July 30, 2024

hello can anyone help me for my project.

i want to ask you about how to program mapping if i have a value adc form potentiometer and i want to used for dac, for step i want i want to map the adc but i don't know hoe to map, if you knows, please bring me a answer or steps or recomend channel or website to help me in my project.

if you have a example of program, can you give me to see in this blog?

Amel NASRI
Technical Moderator
August 1, 2024

Hello @meriarajagukguk ,

I assume that the continuity of this question is here: https://community.st.com/t5/stm32cubemx-mcus/dma-adc-with-potentiometer/td-p/704201.

-Amel

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
ELABI.1
Technical Moderator
July 30, 2024

Hello @meriarajagukguk 

Here is a suggestion:

To get started, you can set up the ADC parameters: resolution, input channel, and sampling frequency.

Then, DAC including the output channel and resolution. Next, adjust the Output Frequency after connecting the ADC to the DAC to reach 200 Hz. 

This wiki may be helpful:

https://wiki.st.com/stm32mcu/wiki/Getting_started_with_ADC#Configure_ADC_to_measure_the_DAC_output

Thanks.

Best Regards,

ELABI.1

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
Explorer
August 12, 2024

Thanks for the wiki link.

Andrew Neil
Super User
July 30, 2024

@meriarajagukguk wrote:

if you want to use ADC to DAC and have 200hz output.


what does that mean?

Do you want that DAC to reproduce whatever the ADC sampled? If so, the DAC output would be governed by whatever you feed into the ADC.

Haven't you asked this same question several times already?

What is this magic 200 Hz that you keep talking about?

 

I think you need to take a step back, and clarify your actual requirements here - what is it that this system is to do?

  1. Forget about DACs and ADCs and STM32.
  2. Just think of your system as a "Black Box"
  3. What needs to go in to your system?
  4. What needs to come out from your system?

 

These are the basic steps that need to be taken to start any development project.

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.