View previous topic :: View next topic |
Author |
Message |
elektroKid Guest
|
OFF Topic: generating 20- 60 HZ |
Posted: Mon Nov 27, 2006 2:08 pm |
|
|
Hi!
Sorry for posting this question on your forum but i think that someone of you gurus knows the right answer.
I have 16F914 and am using internal osc.
What hardware parts ( and how to connect ) do i need for generating 20 - 60 HZ signal from one mcu pin ? |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
|
SherpaDoug
Joined: 07 Sep 2003 Posts: 1640 Location: Cape Cod Mass USA
|
|
Posted: Mon Nov 27, 2006 3:59 pm |
|
|
It makes a big difference if you really need a sine wave, or if a simple square wave will do. Also do you need to be able to change the frequency on the fly? If so then simple low pass filtering of a square wave won't work as 60Hz is the third harmonic of 20Hz. You will have to tune the filter. _________________ The search for better is endless. Instead simply find very good and get the job done. |
|
|
elektroKid Guest
|
|
Posted: Tue Nov 28, 2006 3:23 pm |
|
|
This is the link that i have get from the guys at electro forum.
h**p://www.min.at/prinz/oe1rib/DDS/SineDDS.htm
@ SherpaDoug
It is sine wave and i will have to change frequency on the fly, but i was thinking to make all this thru program ( you know, one buttton press will encrease the frequency for 5 HZ or something like this).
What do you think of the schematisc from the electro forum. Is there simpler way.. |
|
|
SherpaDoug
Joined: 07 Sep 2003 Posts: 1640 Location: Cape Cod Mass USA
|
|
Posted: Tue Nov 28, 2006 5:07 pm |
|
|
That schematic looks OK, but you may have to get a newer D/A converter. Look at the chips by Maxim (www.maximic,com), they give out free samples too.
For the software look into "numerically contrilled oscillator". That is a clever sort of algorithm that does just what you want. _________________ The search for better is endless. Instead simply find very good and get the job done. |
|
|
|