AD9833-Library-Arduino
AD9833-Library-Arduino copied to clipboard
Tried to make a beeping sound
Hi,
I tried to make a beeping sound so I used gen.SleepMode(true); and gen.SleepMode(false); to start and stop the sound. But I get a clicking noise. Is there a better way to realise beeping?
I am having a similar issue, were you able to solve it? https://forum.arduino.cc/t/popping-sound-when-disabling-output-from-sine-tone-generator-ad9833/1099574
I solved it by using while loop and two commands: gen.IncrementFrequency (REG0, freq); gen.ApplySignal(SINE_WAVE, REG0, 0);
gen.IncrementFrequency is able to increase or decrease frequency gradually to the value you like to have. If the sound should stop I use gen.ApplySignal(SINE_WAVE, REG0, 0);
I tried gen.ApplySignal(SINE_WAVE, REG0, 0);
but the clicking is the same as with gen.EnableOutput(false);
Do you keep decreasing frequency till 0?
Yes I decreased till 0
Am 14.03.2023 um 17:39 schrieb ma7555 @.*** @.***>>:
I tried gen.ApplySignal(SINE_WAVE, REG0, 0); but the clicking is the same as with gen.EnableOutput(false); Do you keep decreasing frequency till 0?
— Reply to this email directly, view it on GitHub https://github.com/Billwilliams1952/AD9833-Library-Arduino/issues/9#issuecomment-1468448120, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABSBDZEUNTNGHUOWEHLRNSTW4CNN5ANCNFSM4NN57GRQ. You are receiving this because you authored the thread.
I start at freq 5000 and then did this
for (int i = 0; i < 5; i++) {
gen.IncrementFrequency(REG0, -1000);
}
gen.ApplySignal(SINE_WAVE, REG0, 0);
But the click is still there. Can you post your code?
freqValueNeg = (-1 * freqValueOld) / 8;
int i = 0;
while (i < 8 && freqValueNeg < 0) {
i = i + 1;
gen.IncrementFrequency (REG0, freqValueNeg);
delay(1);
}
gen.ApplySignal(SINE_WAVE, REG0, 0);
freqValueOld = 0;
Am 14.03.2023 um 21:22 schrieb ma7555 @.***>:
I start at freq 5000 and then did this
for (int i = 0; i < 5; i++) { gen.IncrementFrequency(REG0, -1000); } gen.ApplySignal(SINE_WAVE, REG0, 0);
But the click is still there. Can you post your code?
— Reply to this email directly, view it on GitHub https://github.com/Billwilliams1952/AD9833-Library-Arduino/issues/9#issuecomment-1468783801, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABSBDZCPYY6PKAJXABSG5ULW4DHQLANCNFSM4NN57GRQ. You are receiving this because you authored the thread.
I still find the cleanest turn off is using
gen.EnableOutput(true);
delay(1000);
gen.EnableOutput(false);
Thanks bro for your help
pefect! Sorry, that I couldn’t really help!!
Am 21.03.2023 um 22:04 schrieb ma7555 @.***>:
I still find the cleanest turn off is using
gen.EnableOutput(true); delay(1000); gen.EnableOutput(false);
Thanks bro for your help
— Reply to this email directly, view it on GitHub https://github.com/Billwilliams1952/AD9833-Library-Arduino/issues/9#issuecomment-1478577751, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABSBDZBOK54H5S277CXUMD3W5IJXVANCNFSM4NN57GRQ. You are receiving this because you authored the thread.