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

sweep generator

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







sweep generator
PostPosted: Mon Oct 18, 2004 8:37 pm     Reply with quote

how to make a sweep gnerator? sine wave that sweeps through certain
frequencies

thanks in advance
Haplo



Joined: 06 Sep 2003
Posts: 659
Location: Sydney, Australia

View user's profile Send private message

PostPosted: Mon Oct 18, 2004 10:07 pm     Reply with quote

What range of frequencies are you talking about? You can use the PWM module with a low-pass filter.
guest
Guest







PostPosted: Mon Oct 18, 2004 11:46 pm     Reply with quote

i am talking about 1MHz
Haplo



Joined: 06 Sep 2003
Posts: 659
Location: Sydney, Australia

View user's profile Send private message

PostPosted: Tue Oct 19, 2004 12:25 am     Reply with quote

That shouldn't be any problem as long as you use a fast enough oscillator. How small do you want the freqeuncy steps to be?
Will Reeve



Joined: 30 Oct 2003
Posts: 209
Location: Norfolk, England

View user's profile Send private message Send e-mail Visit poster's website MSN Messenger

PostPosted: Tue Oct 19, 2004 2:44 am     Reply with quote

I’ve just finished a project which did just that (well at audio frequencies). After trying PWM, and a 8bit ladder DAC set-up, I ended up with a DDS from Analog Devices. They do a lovely little serial programmed one in a small 10pin package (buy a little PCB to convert to a 10pin DIL) or a faster parallel programmed one in a 28pin package which is the one I used in the end as I needed to change frequencies every 500uS!

They need a clock signal which I generated with the PWM from the PIC. You get a very clean sine wave out.

http://www.analog.com

do a “Search” for the AD9850 and AD9833 which are the two I talk about but there are others.

Little adaptor boards for 10pin to DIL I bought from http://www.epboard.com who shipped to the UK in a couple of days.

Keep well,

Will
guest
Guest







PostPosted: Tue Oct 19, 2004 10:22 am     Reply with quote

thank you all for your help, about the frequency steps the smallest the better it will be, lets say 1Hz .how can i program the uc to do so?
Will Reeve



Joined: 30 Oct 2003
Posts: 209
Location: Norfolk, England

View user's profile Send private message Send e-mail Visit poster's website MSN Messenger

PostPosted: Tue Oct 19, 2004 12:25 pm     Reply with quote

We need range of sweep and how quickly you want to sweep!
yerpa



Joined: 19 Feb 2004
Posts: 58
Location: Wisconsin

View user's profile Send private message Visit poster's website

sweep generator
PostPosted: Tue Oct 19, 2004 12:31 pm     Reply with quote

I agree with Will Reeve - use a dedicated chip if you really need that kind of resolution. You are talking about one part per million resolution - that requires a twenty-bit index if you are doing wavetable lookups, and there would be distortion every time you change the index (see Hal Chamberlin's excellent book "Musical Applications of Microprocessors"). Also, using the PIC alone, you would need a way to keep the sample rate rock steady - not an easy trick. I have tried a similar app and only was able to attain 11 Khz audio sample rate with a 20 MHz PIC 16F876. I could probably multiply that by a factor of ten if constant sweep was the only parameter, but would still be a long way from 1 MHz signal rate (requires minimum 2 MHz sample rate).
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