CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

OFF Topic: generating 20- 60 HZ

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
elektroKid
Guest







OFF Topic: generating 20- 60 HZ
PostPosted: Mon Nov 27, 2006 2:08 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Mon Nov 27, 2006 2:19 pm     Reply with quote

http://www.ccsinfo.com/forum/viewtopic.php?t=26636&highlight=sine+wave
SherpaDoug



Joined: 07 Sep 2003
Posts: 1640
Location: Cape Cod Mass USA

View user's profile Send private message

PostPosted: Mon Nov 27, 2006 3:59 pm     Reply with quote

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







PostPosted: Tue Nov 28, 2006 3:23 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Tue Nov 28, 2006 5:07 pm     Reply with quote

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.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group