Hello,
I need to do sweep frequency from 30kHz till 40KHz for square wave without using tone function and also PORT as both is not declared in my arduino because i have an old one? I need a step of 100Hz. Can anyone help me in this
Thanks a lot
Hello,
I need to do sweep frequency from 30kHz till 40KHz for square wave without using tone function and also PORT as both is not declared in my arduino because i have an old one? I need a step of 100Hz. Can anyone help me in this
Thanks a lot
What's wrong with the tone() function?
The Blink Example makes a (low frequency) square wave... Do you think you could modify it to change the frequency? Do you think you can modify it to change the frequency every time through the loop?
The blink without delay method is probably a better way to go, and of course you'll have to use micros() instead of millis().
I am actually using olimexino and maple IDE software does not support tone function. anyway, i will try your idea with for loop to sweep. can it work so ?
thanks DVDdoug
You could check the Arduino IDE core files to see how the tone() function is implemented. You can find more information on the interrupt registers in Atmel's datasheet.
(You could start with Tone.cpp)
Hope this helps!
Pieter