Sinus Signal Generator from 18Hz to 250kHz

PhilCro
Posts: 1
Joined: Fri May 16, 2025 10:25 am

Re: Sinus Signal Generator from 18Hz to 250kHz

Postby PhilCro » Fri May 16, 2025 11:34 am

Hi. Thanks for doing this code but i have a problem that you may be able to advise me of an answer.
I have downloaded the code and it runs fine. I am using an ESP-Wroom-32D development board. Programming in C#.
I wish to use the board for an FSK project that means i want to change the generated frequency repeatedly to reflect a Binary code.
can you suggest the best way of changing the frequency and at what speed can i do the driven by code. I have added code to make timed calls to the xTaskCreate(dactask, "dactask", 1024*3, NULL, 10, NULL); routine and a global variable to re-load the DAC. Where as it works and the frequency changes, it only lasts for around 5 minuets and the DAC becomes un-reconceive to the request to the frequency change request.me code is as follows:
void loop(){
if (Frequ ==1000) {
Frequ = 300;
} else {
Frequ = 1000;
}

xTaskCreate(dactask, "dactask", 1024*3, NULL, 10, NULL);


delay (2000);


the global var Frequ is loaded to the f_target variable in the xTaskCreate(dactask, "dactask", 1024*3, NULL, 10, NULL); routine.
#include "soc/rtc_io_reg.h"
#include "soc/rtc_cntl_reg.h"
#include "soc/sens_reg.h"
#include "soc/rtc.h"
#include "driver/dac.h"

double Frequ = 300;

The sign was gennerate is excilent. Can you help please.

Regards Phil.

Who is online

Users browsing this forum: No registered users and 1 guest