PWM with two different frequencies. (by Magno Medeiros (Brasil))
Hello, please someone help me to create a program that sends time with PWM frequency of 20khz, time issues with PWM frequency of 40khz. time of 5 seconds for each frequency. is attached what I tried to do, but measuring with ossciloscópio see that emits only a frequency of 20 kHz.
(no subject) (by Magno Medeiros (Brasil))
Thank you very much for your help, but unfortunately I could not do what I wanted. Intended to make a circuit to issue various sound frequencies to scare sparrows of my house, but I see on the oscilloscope that is never generated more than one frequency, although did a test by placing a piezoelectric membrane to listen to the sounds and noticed that there is a change in tone (2kHz and 4khz) experienced at various frequencies, has not worked. Still I am very grateful for your help.
(no subject) (by MGP)
I do not understand fully what you want, but in this example, you can not hear frequencies of 20 and 40kHz.
Maybe a drawing of the signals will help.
(no subject) (by Magno Medeiros (Brasil))
Hello friend MGP,
I know I can not hear such a high frequency, so that I said I did tests on other frequencies 1 and 2 kHz, 2 and 4khz, 4:08 khz to try to see with an oscilloscope switching frequency in PWM output, but in no tests leave the two frequencies, only one can be seen on the oscilloscope, what I saw was a change in the pulse width. I did these tests at low frequency whereas if it worked, would be also good at high frequencies. Please find attached a circuit sketch.
Thanks again for your help.
(no subject) (by Magno Medeiros (Brasil))
I mean: see the signal on an oscilloscope and listen on a piezo membrane, so the low frequencies. After tested change to other high frequencies that the sparrows can hear
(no subject) (by MGP)
You're right, the only thing you do with it is to change the duty cycle_
It's also not working when you change the dutycycle to zero before changing the PWM frequency.
Maybe a bug, I'll look at it when I have time to work around it.
Perhaps Jonathan knows more about this.
(no subject) (by Magno Medeiros (Brasil))
Ok MGP friend, I understanding! Anyway thank you for your dedicated time to reach these conclusions.